[New-bugs-announce] [issue16933] argparse: remove magic from examples
Thomas Guettler
report at bugs.python.org
Fri Jan 11 14:44:18 CET 2013
New submission from Thomas Guettler:
The current argparse documentation is not easy to read people new to python.
http://docs.python.org/dev/library/argparse.html#choices
{{{
current: parser.add_argument('foo', choices='abc')
}}}
Please make this more explicit:
{{{
better: parser.add_argument('foo', choices=['one', 'two', 'three'])
}}}
{{{
current: parser.parse_args('c'.split()) # looks like perl to me
}}}
{{{
better: parser.parse_args(['c'])
}}}
Next: Please use a more common type, not "complex" in the choices example. It confuses a lot of people.
----------
messages: 179679
nosy: guettli
priority: normal
severity: normal
status: open
title: argparse: remove magic from examples
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16933>
_______________________________________
More information about the New-bugs-announce
mailing list