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
|
@ -28,7 +28,7 @@ def unistr(data):
|
|||
for x in data:
|
||||
if x > sys.maxunicode:
|
||||
raise RangeError
|
||||
return "".join([unichr(x) for x in data])
|
||||
return "".join([chr(x) for x in data])
|
||||
|
||||
class NormalizationTest(unittest.TestCase):
|
||||
def test_main(self):
|
||||
|
@ -77,7 +77,7 @@ class NormalizationTest(unittest.TestCase):
|
|||
|
||||
# Perform tests for all other data
|
||||
for c in range(sys.maxunicode+1):
|
||||
X = unichr(c)
|
||||
X = chr(c)
|
||||
if X in part1_data:
|
||||
continue
|
||||
self.failUnless(X == NFC(X) == NFD(X) == NFKC(X) == NFKD(X), c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue