R. David Murray added the comment:
I agree with Chris here. We also need to add the various tests he's come up
with. IMO the easiest way to restore the original behavior and the preserve
the fixes is to make the following single line change:
diff --git a/Lib/argparse.py b/Lib/argparse.py
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -1962,7 +1962,8 @@
# only if it was defined already in the namespace
if (action.default is not None and
hasattr(namespace, action.dest) and
- action.default is getattr(namespace, action.dest)):
+ action.default is getattr(namespace, action.dest) and
+ isinstance(action.default, str)):
setattr(namespace, action.dest,
self._get_value(action, action.default))
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15906>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com