paul j3 added the comment: 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 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9351> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com