Jakub Warmuz <jakub.warmuz+bugs.python....@gmail.com> added the comment:
Attached quick&dirty fix I'm currently using in my project. Maybe this will help to create a valid patch. Instead of changing _parse_optional, I've overridden _get_option_tuples to scan subparsers for matching optional arguments if option is ambiguous in the current parser. I've only skimmed through the code, so forgive me if that fix is useless. ---------- Added file: http://bugs.python.org/file24945/argparse_dirty_hack.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14365> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com