[docs] [issue11176] give more meaningful argument names in argparse documentation

Steven Bethard report at bugs.python.org
Thu Feb 10 16:48:57 CET 2011

New submission from Steven Bethard <steven.bethard at gmail.com>:

Suggestion from a personal email:

I personally am not keen on the foo/bar/baz examples. I
know that you're trying to be generic but IMO it would be much easier to
understand if you used meaningful names. Also, I think that the very
first example you give (which does use meaningful names:-) is too
clever. I'd suggest using something simpler: in fact I'd use exactly the
same example that optparse uses (--file && --quiet) since that is easy
to understand and relate to straight away, and maybe add a --line option
that takes a list of ints (ostensibly line numbers of lines to extract
from the file) if you want to show that argparse leaves optparse in the
dust. And you can always show how to get actual file objects later on.

assignee: docs at python
components: Documentation
messages: 128302
nosy: bethard, docs at python
priority: normal
severity: normal
stage: needs patch
status: open
title: give more meaningful argument names in argparse documentation
type: feature request
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the docs mailing list