summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorJack DeVries <58614260+jdevries3133@users.noreply.github.com>2021-07-31 16:27:55 (GMT)
committerGitHub <noreply@github.com>2021-07-31 16:27:55 (GMT)
commit0ad173249d287794d53e6a1fe2d58bb2adee2276 (patch)
tree29c7cf367e7407d308b692a86c202a445c74559f /Lib/argparse.py
parent1cf8424a62db38a041d421a46618e025bbb87f89 (diff)
downloadcpython-0ad173249d287794d53e6a1fe2d58bb2adee2276.zip
cpython-0ad173249d287794d53e6a1fe2d58bb2adee2276.tar.gz
cpython-0ad173249d287794d53e6a1fe2d58bb2adee2276.tar.bz2
bpo-37880: for argparse add_argument with action='store_const', const now defaults to None. (GH-26707)
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r--Lib/argparse.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py
index e3a49e7..33c5d70 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -855,6 +855,7 @@ class Action(_AttributeHolder):
def __call__(self, parser, namespace, values, option_string=None):
raise NotImplementedError(_('.__call__() not defined'))
+
class BooleanOptionalAction(Action):
def __init__(self,
option_strings,
@@ -936,7 +937,7 @@ class _StoreConstAction(Action):
def __init__(self,
option_strings,
dest,
- const,
+ const=None,
default=None,
required=False,
help=None,
@@ -1031,7 +1032,7 @@ class _AppendConstAction(Action):
def __init__(self,
option_strings,
dest,
- const,
+ const=None,
default=None,
required=False,
help=None,