[issue16678] optparse: parse only known options

New submission from anatoly techtonik: This following recipe from Optik examples should be added to documentation. It is extremely helpful when porting to optparse from getopt or other option parsing schemes. ---------- assignee: docs@python components: Documentation messages: 177447 nosy: docs@python, techtonik priority: normal severity: normal status: open title: optparse: parse only known options versions: Python 2.6, Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16678> _______________________________________

Changes by anatoly techtonik <techtonik@gmail.com>: Added file: http://bugs.python.org/file28307/pass_through.py _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16678> _______________________________________

anatoly techtonik added the comment: It allows to port options to and from optparse incrementally. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16678> _______________________________________

R. David Murray added the comment: We aren't encouraging people to use optparse any more. The recipe isn't needed in argparse, as that has a "parse_known_args" method that achieves the same end. ---------- nosy: +r.david.murray _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16678> _______________________________________

Éric Araujo added the comment: I agree with David and suggest closing this as outdated. Thanks for the suggestion nonetheless. ---------- nosy: +eric.araujo _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16678> _______________________________________

Andrew Svetlov added the comment: +1 for closing as "won't fix" ---------- nosy: +asvetlov _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16678> _______________________________________

Changes by R. David Murray <rdmurray@bitdance.com>: ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue16678> _______________________________________
participants (4)
-
anatoly techtonik
-
Andrew Svetlov
-
R. David Murray
-
Éric Araujo