Joseph Birr-Pixton <[email protected]> added the comment:
> 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
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14149>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com