Kaydet (Commit) 04fac8ab authored tarafından Robert Collins's avatar Robert Collins

Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond.

üst cdbe6fc2
......@@ -42,7 +42,7 @@ _TYPE_MAPPING = {
'NotImplementedType' : 'type(NotImplemented)',
'SliceType' : 'slice',
'StringType': 'bytes', # XXX ?
'StringTypes' : 'str', # XXX ?
'StringTypes' : '(str,)', # XXX ?
'TupleType': 'tuple',
'TypeType' : 'type',
'UnicodeType': 'str',
......
......@@ -3263,6 +3263,10 @@ class Test_types(FixerTestCase):
a = """type(None)"""
self.check(b, a)
b = "types.StringTypes"
a = "(str,)"
self.check(b, a)
class Test_idioms(FixerTestCase):
fixer = "idioms"
......
......@@ -34,6 +34,8 @@ Core and Builtins
Library
-------
- Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond.
- Issue #24611: Fixed compiling the posix module on non-Windows platforms
without mknod() or makedev() (e.g. on Unixware).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment