Anders Kaseorg <ande...@mit.edu> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9334>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to