anatoly techtonik <techto...@gmail.com> added the comment:

Argparse seems to be overloaded with rarely used features. Instead of providing 
API to add these features and allow users copy examples it tends to be an 
all-in-
one solution that is hard to use due to abundance of specific parameters.

Look at constructor, for example - 
http://argparse.googlecode.com/svn/tags/r101/doc/ArgumentParser.html#usage
{{{
description - Text to display before the argument help.
epilog - Text to display after the argument help.
version - A version number used to add a -v/–version option to the parser.
add_help - Add a -h/–help option to the parser. (default: True)
argument_default - Set the global default value for arguments. (default: None)
parents - A list of :class:ArgumentParser objects whose arguments should also 
be 
included.
prefix_chars - The set of characters that prefix optional arguments. (default: 
‘-
‘)
fromfile_prefix_chars - The set of characters that prefix files from which 
additional arguments should be read. (default: None)
formatter_class - A class for customizing the help output.
conflict_handler - Usually unnecessary, defines strategy for resolving 
conflicting 
optionals.
prog - Usually unnecessary, the name of the program (default: sys.argv[0])
usage - Usually unnecessary, the string describing the program usage (default: 
generated)
}}}

the only useful arguments by default is 'description' and 'add_help' (which is 
better to see as 'no_help' to turn off default behaviour). 'version' is not 
useful, because it adds '-v' shorthand that is often used for verbosity. 
'prefix_chars' is not useful, because the only sense one may need it is to 
provide 
windows conventions like '/longarg' for '--longarg' and not '//longarg', but it 
doesn't allow to do so.

Everything else is constructor bloat, and even with such abundance of options 
it 
still unable to generate usage help prefixed by program name and version - the 
sole feature I miss from optparse.

-1 for now

----------
nosy: +techtonik

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

Reply via email to