summaryrefslogtreecommitdiffstats
path: root/Doc/library/argparse.rst
Commit message (Collapse)AuthorAgeFilesLines
* bpo-29030: Document interaction between *choices* and *metavar*. (GH-23884) ↵Miss Islington (bot)2020-12-221-0/+5
| | | | (GH-23894)
* bpo-42572: Improve argparse docs for the type parameter. (GH-23849) (GH-23869)Miss Islington (bot)2020-12-201-50/+57
|
* bpo-38843: Document behavior of default when the attribute is already set ↵Miss Islington (bot)2020-12-071-1/+9
| | | | | | | | | (GH-23653) (#23668) (cherry picked from commit 752cdf21eb2be0a26ea6a34a0de33a458459aead) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com> Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
* bpo-42501: Revise the usage note for Enums with the choices (GH-23563) ↵Miss Islington (bot)2020-11-301-14/+3
| | | | (GH-23573)
* [3.9] Fix error in argparse documentation example (GH-17399) (GH-21992)Miss Islington (bot)2020-09-041-2/+2
| | | | | | | Automerge-Triggered-By: @rhettinger (cherry picked from commit 8784d3300ec4ffc58bc0e9ab3cff9a24187dbe4c) Co-authored-by: SarahPythonista <4283226+SarahPythonista@users.noreply.github.com>
* bpo-41024: doc: Explicitly mention use of 'enum.Enum' as a valid container ↵Miss Islington (bot)2020-07-171-0/+14
| | | | for '… (GH-20964) (GH-21527)
* bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661) (GH-20363)Miss Islington (bot)2020-05-241-13/+0
|
* bpo-38678: Improve argparse example in tutorial (GH-17207)Raymond Hettinger2019-11-181-1/+3
|
* bpo-38438: Simplify argparse "star nargs" usage. (GH-17106)Brandt Bucher2019-11-111-1/+1
|
* bpo-38531: document extend action's added version (GH-16865)Batuhan Taşkaya2019-10-201-0/+2
|
* bpo-26510: Add versionchanged for required arg of add_subparsers (GH-16588)Adam J. Stewart2019-10-071-1/+4
| | | | | | | | | | The `required` argument to `argparse.add_subparsers` was added in #3027. This PR specifies the earliest version of Python where it is available. https://bugs.python.org/issue26510 Automerge-Triggered-By: @merwok
* bpo-8538: Add support for boolean actions to argparse (GH-11478)Rémi Lapeyre2019-09-131-3/+16
| | | Co-Authored-By: remilapeyre <remi.lapeyre@henki.fr>
* bpo-37908: Add an example of ArgumentParser.exit() (GH-15455)Hai Shi2019-09-121-1/+8
| | | Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com>
* bpo-9938: Add optional keyword argument exit_on_error to ↵Hai Shi2019-09-121-1/+29
| | | | | | | | | | | | argparse.ArgumentParser (GH-15362) Co-Authored-by: Xuanji Li <xuanji@gmail.com> https://bugs.python.org/issue9938 Automerge-Triggered-By: @matrixise
* bpo-16468: Clarify which objects can be passed to "choices" in argparse ↵Raymond Hettinger2019-08-291-3/+2
| | | | (GH-15566)
* bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316)Zac Hatfield-Dodds2019-07-141-0/+4
| | | | | | | | | | | The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing. However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`). Checking the argument for a leading `--` before rejecting it fixes this. This was prompted by pytest-dev/pytest#5469, so a backport to at least 3.8 would be great :smile: And this is my first PR to CPython, so please let me know if I've missed anything! https://bugs.python.org/issue26967
* bpo-23378: Add an extend action to argparse (GH-13305)Batuhan Taşkaya2019-05-211-0/+9
| | | | | | Add an extend action to argparse https://bugs.python.org/issue23378
* bpo-35054: Add yet more index entries for symbols. (GH-10121)Serhiy Storchaka2018-10-281-0/+6
|
* Fix doc for `add_subparsers` arguments (GH-8884)Anthony Sottile2018-08-241-1/+1
| | | There was a missing comma.
* bpo-33109: argparse subparsers are once again not required by default (GH-6919)Ned Deily2018-05-241-1/+1
| | | | | | | | | bpo-26510 in 3.7.0a2 changed the behavior of argparse to make subparsers required by default, returning to the behavior of 2.7 and 3.2. The behavior was changed in 3.3 to be no longer required. While it might make more sense to have the default to required, compatibility with 3.3 through 3.6 is probably less disruptive than trying to reintroduce compatibility with 2.7 at this point. This change restores the 3.6 behavior.
* Fix error messages in argparse examples (GH-6435)suic862018-04-111-2/+2
| | | | The examples in argparse documentation use `error: too few arguments` error message which was removed in this commit f97c59a in 2011.
* Fix typos '.::' should typically just be '::'. (GH-6165)Julien Palard2018-03-281-1/+1
|
* bpo-26510: make argparse subparsers required by default (#3027)Anthony Sottile2017-09-201-2/+5
| | | | | | This fixes a regression from Python 2. To get optional subparsers, use the new parameter ``add_subparsers(required=False)``. Patch by Anthony Sottile.
* bpo-31330: Clarify that RawTextHelpFormatter collapses repeated newlines. ↵Elena Oat2017-09-071-1/+3
| | | | | | (#3272) Also provide a solution if the user wants to keep multiple blank lines.
* bpo-14191 Add parse_intermixed_args. (#3319)R. David Murray2017-09-071-3/+41
| | | This adds support for parsing a command line where options and positionals are intermixed as is common in many unix commands. This is paul.j3's patch with a few tweaks.
* Clarify nature of parse_args 'args' argument. (#3292)R. David Murray2017-09-041-3/+15
| | | | Patch by Paul.j3. Includes an unrelated but useful addition to the optparse porting section.
* Fix grammar, typos and markup in documentation and code commentsMartin Panter2017-01-141-2/+2
| | | | | | * Indent versionchanged at method level, not class level * Mark up ``--help`` to avoid generating an en dash * Use forward slash in Unix command line with a dollar sign ($) prompt
* Issue #19795: Mark up None as literal text.Serhiy Storchaka2016-10-191-4/+4
|
* Issue #28455: Clarify example of overriding the convert_arg_line_to_args methodBerker Peksag2016-10-171-3/+4
| | | | Patch by Mariatta Wijaya.
* Issue #27993: Fix problems with plural objects in docs and commentsMartin Panter2016-09-071-2/+2
|
* Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting.Martin Panter2016-07-261-5/+15
| | | | Patch by Julien Palard.
* Issue #22558: Add remaining doc links to source code for Python-coded modules.Terry Jan Reedy2016-06-111-0/+1
| | | | | Reformat header above separator line (added if missing) to a common format. Patch by Yoni Lavi.
* Issue #23921: Standardized documentation whitespace formatting.Serhiy Storchaka2016-05-101-9/+9
| | | | Original patch by James Edwards.
* Issue #20598: Replace trivial split() calls with lists in argparse docsMartin Panter2016-04-261-23/+23
|
* Fix typos in code comments and documentationMartin Panter2016-04-161-1/+1
|
* Issue #25314: Remove confused statement about const argumentMartin Panter2016-04-091-3/+3
|
* Issue #25314: store_true and store_false also create appropriate defaults.Raymond Hettinger2011-11-201-4/+6
|
* Issue #25523: Further a-to-an corrections new in 3.5Martin Panter2015-11-021-1/+1
|
* Issue #25161: Merge full stops from 3.4 into 3.5Martin Panter2015-10-101-1/+1
|\
| * Issue #25161: Add full stops in documentation; patch by Takase ArihiroMartin Panter2015-10-101-1/+1
| |
| * Back porting changeset db302b88fdb6 to 3.4 branch, which fixed multiple ↵Senthil Kumaran2015-06-151-1/+1
| | | | | | | | | | | | | | | | | | documentation typos. Related Issues: #issue21528 #issue24453
* | Issue #23356: Simplify convert_arg_line_to_args example.Berker Peksag2015-04-261-4/+1
|\ \ | |/ | | | | Patch by py.user.
| * Issue #23356: Simplify convert_arg_line_to_args example.Berker Peksag2015-04-261-4/+1
| | | | | | | | Patch by py.user.
* | Issue #23651: Fix typo in allow_abbrev docs.Berker Peksag2015-03-121-1/+1
| | | | | | | | Noticed by Nathan West.
* | Issue #14910: Add allow_abbrev parameter to argparse.ArgumentParser.Berker Peksag2015-02-131-4/+31
| | | | | | | | Patch by Jonathan Paugh, Steven Bethard, paul j3 and Daniel Eriksson.
* | Issue #22317: Document the action parameter in ↵Berker Peksag2015-01-201-3/+6
|\ \ | |/ | | | | | | | | ArgumentParser.add_subparsers() docs. Patch by Mike Short.
| * Issue #22317: Document the action parameter in ↵Berker Peksag2015-01-201-3/+6
| | | | | | | | | | | | ArgumentParser.add_subparsers() docs. Patch by Mike Short.
* | Revert #22251Berker Peksag2014-09-271-1/+0
|\ \ | |/
| * Revert #22251Berker Peksag2014-09-271-1/+0
| |
* | Issue #22251: Fix ReST markup to avoid errors building docs.Berker Peksag2014-09-271-0/+1
|\ \ | |/