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 paul.j3
Recipients bethard, docs@python, paul.j3
Date 2014-08-07.23:27:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
On Stackoverflow a couple of posters have asked about nesting namespaces as a way of separating the parser and subparser arguments.

One solution that I rather like

uses a custom Namespace class that recognizes a 'dest' like

    p.add_argument('--deep', dest='test.doo.deep')

and produces

    Nestedspace(foo='test', test=Nestedspace(bar='baz', doo=Nestedspace(deep='doodod')))

I wonder if a simplified version of this could be added to the Namespace section in the documentation.

There are 2 sides to the name conflict issue:

- what control does the programmer have over names (esp. when using [parents] and subparsers)?

- how does the programmer want to access the arguments in the resulting namespace?
Date User Action Args
2014-08-07 23:27:58paul.j3setrecipients: + paul.j3, bethard, docs@python
2014-08-07 23:27:58paul.j3setmessageid: <>
2014-08-07 23:27:58paul.j3linkissue15428 messages
2014-08-07 23:27:58paul.j3create