diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-10-20 20:25:25 (GMT) |
---|---|---|
committer | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2019-10-20 20:25:25 (GMT) |
commit | db385229645dbaaa9863e259b2fae67b9da873fe (patch) | |
tree | fbb917213c1b76c1535b77b17b86a728aedf5438 | |
parent | c39bc5c9e8f96a8197d1ce2b70746b7189135566 (diff) | |
download | cpython-db385229645dbaaa9863e259b2fae67b9da873fe.zip cpython-db385229645dbaaa9863e259b2fae67b9da873fe.tar.gz cpython-db385229645dbaaa9863e259b2fae67b9da873fe.tar.bz2 |
bpo-38531: document extend action's added version (GH-16865) (GH-16868)
(cherry picked from commit 74142078b3b78fea7b4cd791e5c577c0c0964eb7)
Co-authored-by: Batuhan Taşkaya <47358913+isidentical@users.noreply.github.com>
-rw-r--r-- | Doc/library/argparse.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index ee005594..5a61a5b 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -810,6 +810,8 @@ how the command-line arguments should be handled. The supplied actions are: >>> parser.parse_args(["--foo", "f1", "--foo", "f2", "f3", "f4"]) Namespace(foo=['f1', 'f2', 'f3', 'f4']) + .. versionadded:: 3.8 + You may also specify an arbitrary action by passing an Action subclass or other object that implements the same interface. The recommended way to do this is to extend :class:`Action`, overriding the ``__call__`` method |