[issue14449] argparse optional arguments sh

2012-03-29 Thread Ernest N. Mamikonyan

Changes by Ernest N. Mamikonyan :


--
components: Library (Lib)
nosy: mamikonyan
priority: normal
severity: normal
status: open
title: argparse optional arguments sh
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker 
<http://bugs.python.org/issue14449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14449] argparse optional arguments sh

2012-03-29 Thread Ernest N. Mamikonyan

New submission from Ernest N. Mamikonyan :

The nargs='?' option should probably follow the getopt_long(1) convention and 
only consume an (optional) argument if it's in the same argv element, i.e., 
without a space. Otherwise, it can only be given as the last option on the 
command-line. For example, in

./prog -a ARG1 ARG2

ARG1 should not be considered an optional argument to -a, but here, it should:

./prog -aARG1 ARG2

--

___
Python tracker 
<http://bugs.python.org/issue14449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14449] argparse optional arguments should follow getopt_long(3)

2012-03-29 Thread Ernest N. Mamikonyan

Changes by Ernest N. Mamikonyan :


--
title: argparse optional arguments sh -> argparse optional arguments should 
follow getopt_long(3)

___
Python tracker 
<http://bugs.python.org/issue14449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14449] argparse optional arguments should follow getopt_long(3)

2012-04-01 Thread Ernest N. Mamikonyan

Ernest N. Mamikonyan  added the comment:

Yes, it is incompatible. But that's because the current behavior is 
incompatible with standard (getopt_long(3)) practice. Or perhaps, you 
can add another option that implements the optional argument semantics 
of GNU's getopt_long(3).

In any case, I understand. If you figure out some other way, please let 
me know (or document it).

Thanks much,
Ernest Mamikonyan

--

___
Python tracker 
<http://bugs.python.org/issue14449>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com