Max Rothman added the comment:

Martin: huh, I didn't notice that documentation. The error message definitely 
could be improved.

It still seems like an odd choice given that argparse knows about the expected 
spec, so it knows whether there are any options or not. Perhaps one could 
enable/disable this cautious behavior with a flag passed to ArgumentParser? It 
was rather surprising in my case, since I was parsing morse code and the 
arguments were random combinations of "-", "_", and "*", so it wasn't 
immediately obvious what the issue was.

----------

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

Reply via email to