This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andersk
Recipients andersk, bethard, davidben, drm, eric.araujo, eric.smith, gdb, nelhage, r.david.murray, skilletaudio
Date 2011-12-28.22:20:10
SpamBayes Score 6.509686e-05
Marked as misclassified No
Message-id <>
James: That’s not related to this issue.  This issue is about options taking arguments beginning with dash (such as a2x --asciidoc-opts --safe, where --safe is the argument to --asciidoc-opts), not positional arguments beginning with dash.

Your observation isn’t a bug.  In all getopt-like parsers, -- is the only way to pass positional arguments beginning with -.  (Whether you shell-quoted the argument is irrelevant; the - is interpreted by the program, not the shell, after the shell has already stripped off the shell quoting.)

If your program doesn’t take any options and you’d like to parse positional arguments without requiring --, don’t use a getopt-like parser; use sys.argv directly.

If you still think your example is a bug, please file a separate report.
Date User Action Args
2011-12-28 22:20:11andersksetrecipients: + andersk, bethard, eric.smith, eric.araujo, r.david.murray, gdb, nelhage, drm, davidben, skilletaudio
2011-12-28 22:20:11andersksetmessageid: <>
2011-12-28 22:20:10andersklinkissue9334 messages
2011-12-28 22:20:10anderskcreate