From 02c42c9cf6a89bddf46bf104d7be4f69aae129ed Mon Sep 17 00:00:00 2001 From: Philipp Hahn Date: Thu, 14 Jun 2018 15:13:10 +0200 Subject: [PATCH] optparse.Values.__getattr__ like argparse.Namespace (#2228) optparse.Values is like argparse.Namespace and also has a __getattr__() method to return the parsed options. Apply commits 54b4983 and 9ae0c0b from python/typeshed#25 --- stdlib/2and3/optparse.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/2and3/optparse.pyi b/stdlib/2and3/optparse.pyi index 2e52647f5ff0..03532d910caa 100644 --- a/stdlib/2and3/optparse.pyi +++ b/stdlib/2and3/optparse.pyi @@ -224,3 +224,4 @@ class Values: def ensure_value(self, attr: Any, value: Any) -> Any: ... def read_file(self, filename: _Text, mode: _Text) -> None: ... def read_module(self, modname: _Text, mode: _Text) -> None: ... + def __getattr__(self, name: str) -> Any: ...