New submission from Victor Porton <por...@narod.ru>:
I have: parser.add_argument('-p', '--preload', help='preload asset', action='append', metavar='NAMESPACE') I want also add: parser.add_argument('-f', '--file', help='preload file', action='append', metavar='FILE', dest='preload') This way I could specify -p and/or -f options in any order (like: first -p then -f then -p again) and store then in 'preload' field in the order which the user specified the options. But I have no way to know if an option is -p or -f :-( Please add something to argparse to solve this problem. ---------- components: Library (Lib) messages: 323857 nosy: porton priority: normal severity: normal status: open title: No way to alternate options versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34458> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com