mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Rename 'unicode' to 'str' in its tp_name field. Rename 'str' to 'str8'.
Change all occurrences of unichr to chr.
This commit is contained in:
parent
ef87d6ed94
commit
84fc66dd02
17 changed files with 45 additions and 66 deletions
|
@ -244,8 +244,8 @@ class TestBase:
|
|||
self.assertEqual(ostream.getvalue(), self.tstring[0])
|
||||
|
||||
if len('\U00012345') == 2: # ucs2 build
|
||||
_unichr = unichr
|
||||
def unichr(v):
|
||||
_unichr = chr
|
||||
def chr(v):
|
||||
if v >= 0x10000:
|
||||
return _unichr(0xd800 + ((v - 0x10000) >> 10)) + \
|
||||
_unichr(0xdc00 + ((v - 0x10000) & 0x3ff))
|
||||
|
@ -272,7 +272,7 @@ class TestBase_Mapping(unittest.TestCase):
|
|||
return test_support.open_urlresource(self.mapfileurl)
|
||||
|
||||
def test_mapping_file(self):
|
||||
unichrs = lambda s: ''.join(map(unichr, map(eval, s.split('+'))))
|
||||
unichrs = lambda s: ''.join(map(chr, map(eval, s.split('+'))))
|
||||
urt_wa = {}
|
||||
|
||||
for line in self.open_mapping_file():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue