homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vdupras
Recipients vdupras
Date 2011年01月31日.08:05:02
SpamBayes Score 1.163958e-08
Marked as misclassified No
Message-id <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za>
In-reply-to
Content
Currently, there is no (documented) way to easily extract arguments in an argparse Namespace as a dictionary. This way, it would me easy to interface a function taking a lot of kwargs like this:
>>> args = parser.parse_args()
>>> my_function(**dict(args))
There's "_get_kwargs()" but it's a private undocumented method. I guess that making it public would be problematic because of the namespace pollution that would occur. That's why I'm proposing to make it iterable.
If it isn't rejected, I'd gladly work on the required patch.
History
Date User Action Args
2011年01月31日 08:05:03vduprassetrecipients: + vdupras
2011年01月31日 08:05:03vduprassetmessageid: <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za>
2011年01月31日 08:05:02vdupraslinkissue11076 messages
2011年01月31日 08:05:02vduprascreate

AltStyle によって変換されたページ (->オリジナル) /