Author: Armin Rigo <[email protected]>
Branch:
Changeset: r66896:6fd3cdc48a70
Date: 2013-09-10 23:08 +0200
http://bitbucket.org/pypy/pypy/changeset/6fd3cdc48a70/
Log: Don't use this logic for str and unicode. The other checks have
been tested to not cause any CPython failure in test_argparse.
diff --git a/lib-python/2.7/argparse.py b/lib-python/2.7/argparse.py
--- a/lib-python/2.7/argparse.py
+++ b/lib-python/2.7/argparse.py
@@ -1784,16 +1784,15 @@
# XXX PyPy bug-to-bug compatibility: "is" on primitive types
# is not consistent in CPython. We'll assume it is close
# enough for ints (which is true only for "small ints"), but
- # for floats and longs and complexes and strings we'll go
- # for the option of forcing "is" to say False, like it
- # usually does on CPython. A fix is pending on CPython
- # trunk (http://bugs.python.org/issue18943) but that might
- # change the details of the semantics and so not be applied
- # to 2.7. See the two lines AA below.
+ # for floats and longs and complexes we'll go for the option
+ # of forcing "is" to say False, like it usually does on
+ # CPython. A fix is pending on CPython trunk
+ # (http://bugs.python.org/issue18943) but that might change
+ # the details of the semantics and so not be applied to 2.7.
+ # See the line AA below.
if (argument_values is not action.default or
- type(argument_values) in (float, long, complex, # AA
- str, unicode)): # AA
+ type(argument_values) in (float, long, complex)): # AA
seen_non_default_actions.add(action)
for conflict_action in action_conflicts.get(action, []):
if conflict_action in seen_non_default_actions:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit