[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2019-08-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking this as out-of-date. It seems that the desired functionality has already been added in types.SimpleNamespace: # Capabilities of _AttributeHolder >>> ah = _AttributeHolder() >>> ah AttributeHolder() >>> ah.raymond='Red' >>>

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2019-08-29 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: bethard -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2014-07-05 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: +paul.j3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10190 ___ ___ Python-bugs-list

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2014-07-05 Thread paul j3
paul j3 added the comment: Apart from sorting, `_get_kwargs` does little more than: return [k for k in action.__dict__.items() if not k[0].startswith('_')] That is, it's the `items()` of the 'public' attributes of the action (or parser). Those attributes are already accessible to the

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2010-10-25 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Could you elaborate a little on what you use it for? The argparse module only uses this for pretty __repr__ on the various objects. (And in fact, it looks like it's gotten a little out of sync - required is missing from Action, and a

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2010-10-25 Thread Dariusz Suchojad
Dariusz Suchojad ds...@gefira.pl added the comment: I find that _AttributeHolder is a handy way for passing the command line options around the application. What is lacks though is a documented API for actually fetching the attributes in batches, like .items() or something similar that could

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2010-10-25 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Removing docs unless this actually becomes a doc issue -- nosy: +tim.golden -d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10190

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2010-10-25 Thread Tim Golden
Changes by Tim Golden m...@timgolden.me.uk: -- assignee: d...@python - bethard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10190 ___ ___

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2010-10-25 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- components: -Documentation nosy: +eric.araujo versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10190 ___

[issue10190] Can argparse._AttributeHolder._get_kwargs become a public API?

2010-10-24 Thread Dariusz Suchojad
New submission from Dariusz Suchojad ds...@gefira.pl: Hello, I was wondering if it were possible for the argparse._AttributeHolder._get_kwargs to become a part of the public API. Using this method is a very convenient way to get a hold of the arguments provided by the user and it would be