New submission from Mitchell Model <m...@acm.org>: The help example in the middle of the optparse library documentation is broken. The code reads:
parser = OptionParser() parser.add_option("-h", "--help", action="help"), parser.add_option("-v", action="store_true", dest="verbose", help="Be moderately verbose") parser.add_option("--file", dest="filename", help="Input file to read data from"), The result of executing this code is: optparse.OptionConflictError: option -h/--help: conflicting option string(s): -h, --help I see that the documentation says that normally help is added automatically so you don't need to do it, but doing so shouldn't break especially since the example shows doing it. Also, the trailing commas on two of the lines are weird and should be removed. ---------- assignee: georg.brandl components: Documentation messages: 92530 nosy: MLModel, georg.brandl severity: normal status: open title: optparser example in optparse documentation is broken versions: Python 3.0, Python 3.1, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6892> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com