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