diff options
author | Barry Warsaw <barry@python.org> | 2012-09-12 15:31:38 -0400 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2012-09-12 15:31:38 -0400 |
commit | d89774e1581ad2ca03ba06876d0fe4f2a2d8ff91 (patch) | |
tree | c765a7143fe958d03e4b92d2a8b75b7fac714387 /Lib/argparse.py | |
parent | Merge (diff) | |
parent | Update merge from 2.7: s/basetring/str (diff) | |
download | cpython-d89774e1581ad2ca03ba06876d0fe4f2a2d8ff91.tar.gz cpython-d89774e1581ad2ca03ba06876d0fe4f2a2d8ff91.tar.bz2 cpython-d89774e1581ad2ca03ba06876d0fe4f2a2d8ff91.zip |
Merge 3.2 fix updates and tests for issue #15906.
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r-- | Lib/argparse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py index 66cd70aa315..f25b1b66109 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -1961,7 +1961,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer): # twice (which may fail) if the argument was given, but # only if it was defined already in the namespace if (action.default is not None and - isinstance(action, _StoreAction) and + isinstance(action.default, str) and hasattr(namespace, action.dest) and action.default is getattr(namespace, action.dest)): setattr(namespace, action.dest, |