Message154614
> 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 |
|
Date |
User |
Action |
Args |
2012-02-29 11:19:10 | Joseph.Birr-Pixton | set | recipients:
+ Joseph.Birr-Pixton, bethard, eric.araujo, docs@python |
2012-02-29 11:19:10 | Joseph.Birr-Pixton | set | messageid: <1330514350.4.0.426847968677.issue14149@psf.upfronthosting.co.za> |
2012-02-29 11:19:09 | Joseph.Birr-Pixton | link | issue14149 messages |
2012-02-29 11:19:09 | Joseph.Birr-Pixton | create | |
|