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 Joseph.Birr-Pixton
Recipients Joseph.Birr-Pixton, bethard, docs@python, eric.araujo
Date 2012-02-29.11:19:09
SpamBayes Score 1.5553855e-05
Marked as misclassified No
Message-id <1330514350.4.0.426847968677.issue14149@psf.upfronthosting.co.za>
In-reply-to
Content
> I don’t understand, can you rephrase?

Sorry, I mean making Namespace subscriptable.  eg:

>>> v = argparse.Namespace(abc = 123)
>>> v
Namespace(abc=123)
>>> v.abc
123
>>> v['abc']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'Namespace' object is not subscriptable

> add_argument('foo_bar', metavar='foo-bar', ...)

This works. Thanks!

Cheers,
Joe
History
Date User Action Args
2012-02-29 11:19:10Joseph.Birr-Pixtonsetrecipients: + Joseph.Birr-Pixton, bethard, eric.araujo, docs@python
2012-02-29 11:19:10Joseph.Birr-Pixtonsetmessageid: <1330514350.4.0.426847968677.issue14149@psf.upfronthosting.co.za>
2012-02-29 11:19:09Joseph.Birr-Pixtonlinkissue14149 messages
2012-02-29 11:19:09Joseph.Birr-Pixtoncreate