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, ezio.melotti, mikn, nailor, paul.j3, petri.lehtinen
Date 2014-05-29.04:39:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This is not getting much attention for several reasons:

- there's quite a backlog of argparse patches and issues

- 'set_defaults' is not commonly used.  Setting default in 'add_argument' seems more common.

- defining the same argument for both the parser and subparser can create other difficulties.

- in Bethard's example, 'set_default' sets an attribute that has no connection to any argument.  It's a cleaver trick that few users will think to use, and probably won't be of much value.

The idea proposed here of using a subnamespace for the subparser is interesting.  It reminds me of a StackOverflow question about implementing nested namespaces.
Date User Action Args
2014-05-29 04:39:17paul.j3setrecipients: + paul.j3, bethard, ezio.melotti, nailor, petri.lehtinen, mikn
2014-05-29 04:39:16paul.j3setmessageid: <>
2014-05-29 04:39:15paul.j3linkissue9351 messages
2014-05-29 04:39:14paul.j3create