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 Peter McEldowney, paul.j3
Date 2019-04-21.03:29:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555817395.59.0.651139947319.issue36664@roundup.psfhosted.org>
In-reply-to
Content
https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_subparsers

shows how to use `set_defaults` in a parser to set a 'func' attribute.  That method could just as well be used to set the true 'name' or any other kind of attribute that is unique to that parser.  

I think we should leave the code as is, storing the aliases in the subparsers' 'dest'.  It's been that way since aliases were added, and changing it runs the risk of creating backward compatibility issues.  

There are enough work arounds if you don't want the aliases.
History
Date User Action Args
2019-04-21 03:29:55paul.j3setrecipients: + paul.j3, Peter McEldowney
2019-04-21 03:29:55paul.j3setmessageid: <1555817395.59.0.651139947319.issue36664@roundup.psfhosted.org>
2019-04-21 03:29:55paul.j3linkissue36664 messages
2019-04-21 03:29:55paul.j3create