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 <1401338356.33.0.292472373621.issue9351@psf.upfronthosting.co.za>
In-reply-to
Content
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.

http://stackoverflow.com/questions/18668227
History
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: <1401338356.33.0.292472373621.issue9351@psf.upfronthosting.co.za>
2014-05-29 04:39:15paul.j3linkissue9351 messages
2014-05-29 04:39:14paul.j3create