summaryrefslogtreecommitdiffstats
path: root/Doc/library/argparse.rst
Commit message (Collapse)AuthorAgeFilesLines
* gh-103921: Rename "type" header in argparse docs (#104654)Jelle Zijlstra2023-05-191-15/+15
| | | | | This allows :keyword:`type` to link to docs for the new `type` statement (being written in gh-104642) instead of to this header in the argparse docs.
* gh-101100: Fix Sphinx warnings in `argparse` module (#103289)Hugo van Kemenade2023-04-241-6/+20
| | | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-103582: Remove last references to `argparse.REMAINDER` from docs (#103586)Nikita Sobolev2023-04-191-2/+2
|
* Fix style in argparse.rst (#101733)Marcin Wieczorek2023-03-081-3/+3
|
* gh-99735: Use required=True in argparse subparsers example (#100927)Patricio Paez2023-02-191-1/+1
|
* Add missing preposition in argparse docs (#101548)alnoki2023-02-051-1/+1
|
* gh-92446: Improve argparse choices docs; revert bad change to lzma docs (#94627)Guy Yagev2022-12-261-6/+6
| | | | | | | Based on the definition of the collections.abc classes, it is more accurate to use "sequence" instead of "container" when describing argparse choices. A previous attempt at fixing this in #92450 was mistaken; this PR reverts that change. Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* gh-99087: Add missing newline for prompts in docs (GH-98993)Stanley2022-12-091-0/+1
| | | Add newline for prompts so copying to REPL does not cause errors.
* gh-99650 : Updated argparse docs (GH-99653)ram vikram singh2022-11-221-1/+1
|
* `argparse` docs: normalize constant references (#98765)Skip Montanaro2022-10-281-5/+6
|
* 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
|