summaryrefslogtreecommitdiffstats
path: root/Doc/library/argparse.rst
Commit message (Collapse)AuthorAgeFilesLines
* gh-94787: [doc] Add to argparse doc an example of a mutually-exclusive group ↵Scott Main2022-09-181-1/+20
| | | | nested in an argument group (GH-94807)
* gh-85308: argparse: Use filesystem encoding for arguments file (GH-93277)Inada Naoki2022-06-231-1/+10
|
* gh-92812: Align ArgumentParser.add_subparsers() docs with argument spec (#92814)1809092022-05-181-1/+1
|
* bpo-9182: Add a section on specifying positional arguments (#31810)slateny2022-05-131-2/+5
|
* Fix typo in argparse docs. (GH-92691)thueringa2022-05-121-1/+1
| | | | | | | | | | | | | # Fix typo in argparse docs. > Sometimes, when dealing with **a** particularly long argument list**s**, [...] Mixture between plural and singular forms is incorrect. Use singular consistently since typically only a single argument list is employed. Change to: > Sometimes, when dealing with a particularly long argument list, [...] No issue was opened, since this is a trivial change. Automerge-Triggered-By: GH:rhettinger
* update argparse's doc of append action. (#92344)Hai Shi2022-05-061-2/+4
|
* Improving readability of argparse.rst (GH-91751)Antonio Andrade2022-04-301-8/+8
| | | | | | Fixed few typos and enhanced few paragraphs for your review and consideration. Trivial contribution towards continuous improvement, so no issue was raised. Automerge-Triggered-By: GH:rhettinger
* Minor improvements to grammar and markup. (GH-91762)Raymond Hettinger2022-04-201-12/+12
|
* Clean-up the argparse docs quick links table (GH-91726)Raymond Hettinger2022-04-201-55/+33
|
* bpo-21150: Add quick link/summary table to the top of argparse documentation ↵Susan Su2022-04-181-0/+98
| | | | | (GH-12005) No work has been done to move this forward. On the theory that perfect is the enemy of good, I'm going to push it and we can make minor edits as needed afterwards.
* argparse docs: prog default is the basename of argv[0] (GH-30298)Jade Lovelace2022-01-021-1/+2
|
* bpo-22047: [argparse] deprecate nested argument groups and mutually ↵Irit Katriel2021-12-161-0/+12
| | | | exclusive groups (GH-30098)
* [doc] fix minor typo for argparse (GH-28451)Louis Sautier2021-09-281-1/+1
| | | "A JSONDecodeError" instead of "An JSONDecodeError".
* bpo-37880: for argparse add_argument with action='store_const', const now ↵Jack DeVries2021-07-311-11/+16
| | | | defaults to None. (GH-26707)
* bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction ↵David Sanders2021-07-121-0/+2
| | | | (GH-23026)
* Use the zero argument form of super() in examples for Python3 docs. (GH-22314)Andre Delfino2021-04-261-1/+1
|
* Fix documentation typos of argparse exit_on_error (GH-22706)Taneli Hukkinen2021-04-261-1/+1
|
* bpo-9694: Fix misleading phrase "optional arguments" (GH-23858)Raymond Hettinger2020-12-231-27/+27
|
* bpo-29030: Document interaction between *choices* and *metavar*. (GH-23884)Raymond Hettinger2020-12-221-0/+5
|
* bpo-42572: Improve argparse docs for the type parameter. (GH-23849)Raymond Hettinger2020-12-201-50/+57
|
* bpo-38843: Document behavior of default when the attribute is already set ↵Raymond Hettinger2020-12-071-1/+9
| | | | (GH-23653)
* bpo-42501: Revise the usage note for Enums with the choices (GH-23563)Raymond Hettinger2020-11-301-14/+3
|
* Fix error in argparse documentation example (GH-17399)SarahPythonista2020-08-281-2/+2
| | | Automerge-Triggered-By: @rhettinger
* bpo-41024: doc: Explicitly mention use of 'enum.Enum' as a valid container ↵Vincent Férotin2020-06-201-0/+14
| | | | | | | | | for '… (GH-20964) …choices' argument of 'argparse.ArgumentParser.add_argument'. Here's a short first proposal of doc. enhancement addressing [bpo-41024](). Automerge-Triggered-By: @csabella
* bpo-17050: Remove documentation on argparse.REMAINDER (GH-18661)Albert2020-05-241-13/+0
| | | | | Closes [Issue 17050]() by removing argparse.REMAINDER from the documentation, as discussed on the issue. Automerge-Triggered-By: @rhettinger
* 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.