summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-01-18 09:33:31 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-01-18 09:33:31 (GMT)
commit82e07b92b330ec885968ca98fac5284c45037eac (patch)
treef8cf075bd42432e50b25979f28bc83a606bbf828 /Lib
parentacdb7c158a53d67a7c1e309023248a489cd18295 (diff)
parentd3faf43f9ba7da0ae504c9186b10d0fa3a8eb300 (diff)
downloadcpython-82e07b92b330ec885968ca98fac5284c45037eac.zip
cpython-82e07b92b330ec885968ca98fac5284c45037eac.tar.gz
cpython-82e07b92b330ec885968ca98fac5284c45037eac.tar.bz2
Issue #23181: More "codepoint" -> "code point".
Diffstat (limited to 'Lib')
-rw-r--r--Lib/codecs.py2
-rw-r--r--Lib/email/message.py2
-rw-r--r--Lib/html/entities.py4
-rw-r--r--Lib/test/multibytecodec_support.py2
-rw-r--r--Lib/test/test_html.py4
-rw-r--r--Lib/test/test_multibytecodec.py2
-rw-r--r--Lib/test/test_stringprep.py2
-rw-r--r--Lib/test/test_unicode.py4
8 files changed, 11 insertions, 11 deletions
diff --git a/Lib/codecs.py b/Lib/codecs.py
index 2d6291e..7439b9f 100644
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -124,7 +124,7 @@ class Codec:
Python will use the official U+FFFD REPLACEMENT
CHARACTER for the builtin Unicode codecs on
decoding and '?' on encoding.
- 'surrogateescape' - replace with private codepoints U+DCnn.
+ 'surrogateescape' - replace with private code points U+DCnn.
'xmlcharrefreplace' - Replace with the appropriate XML
character reference (only for encoding).
'backslashreplace' - Replace with backslashed escape sequences
diff --git a/Lib/email/message.py b/Lib/email/message.py
index 727cd1e..3d3138f 100644
--- a/Lib/email/message.py
+++ b/Lib/email/message.py
@@ -273,7 +273,7 @@ class Message:
bpayload = payload.encode('ascii')
except UnicodeError:
# This won't happen for RFC compliant messages (messages
- # containing only ASCII codepoints in the unicode input).
+ # containing only ASCII code points in the unicode input).
# If it does happen, turn the string into bytes in a way
# guaranteed not to fail.
bpayload = payload.encode('raw-unicode-escape')
diff --git a/Lib/html/entities.py b/Lib/html/entities.py
index cbf4f76..3e1778b 100644
--- a/Lib/html/entities.py
+++ b/Lib/html/entities.py
@@ -3,7 +3,7 @@
__all__ = ['html5', 'name2codepoint', 'codepoint2name', 'entitydefs']
-# maps the HTML entity name to the Unicode codepoint
+# maps the HTML entity name to the Unicode code point
name2codepoint = {
'AElig': 0x00c6, # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1
'Aacute': 0x00c1, # latin capital letter A with acute, U+00C1 ISOlat1
@@ -2495,7 +2495,7 @@ html5 = {
'zwnj;': '\u200c',
}
-# maps the Unicode codepoint to the HTML entity name
+# maps the Unicode code point to the HTML entity name
codepoint2name = {}
# maps the HTML entity name to the character
diff --git a/Lib/test/multibytecodec_support.py b/Lib/test/multibytecodec_support.py
index 51f5b54..bc1cfc8 100644
--- a/Lib/test/multibytecodec_support.py
+++ b/Lib/test/multibytecodec_support.py
@@ -21,7 +21,7 @@ class TestBase:
roundtriptest = 1 # set if roundtrip is possible with unicode
has_iso10646 = 0 # set if this encoding contains whole iso10646 map
xmlcharnametest = None # string to test xmlcharrefreplace
- unmappedunicode = '\udeee' # a unicode codepoint that is not mapped.
+ unmappedunicode = '\udeee' # a unicode code point that is not mapped.
def setUp(self):
if self.codec is None:
diff --git a/Lib/test/test_html.py b/Lib/test/test_html.py
index 5e9f382..d6f0ae8 100644
--- a/Lib/test/test_html.py
+++ b/Lib/test/test_html.py
@@ -48,10 +48,10 @@ class HtmlTests(unittest.TestCase):
check(s % num, char)
for end in [' ', 'X']:
check((s+end) % num, char+end)
- # check invalid codepoints
+ # check invalid code points
for cp in [0xD800, 0xDB00, 0xDC00, 0xDFFF, 0x110000]:
check_num(cp, '\uFFFD')
- # check more invalid codepoints
+ # check more invalid code points
for cp in [0x1, 0xb, 0xe, 0x7f, 0xfffe, 0xffff, 0x10fffe, 0x10ffff]:
check_num(cp, '')
# check invalid numbers
diff --git a/Lib/test/test_multibytecodec.py b/Lib/test/test_multibytecodec.py
index ea592c7..ce267dd 100644
--- a/Lib/test/test_multibytecodec.py
+++ b/Lib/test/test_multibytecodec.py
@@ -80,7 +80,7 @@ class Test_IncrementalEncoder(unittest.TestCase):
self.assertEqual(encoder.reset(), None)
def test_stateful(self):
- # jisx0213 encoder is stateful for a few codepoints. eg)
+ # jisx0213 encoder is stateful for a few code points. eg)
# U+00E6 => A9DC
# U+00E6 U+0300 => ABC4
# U+0300 => ABDC
diff --git a/Lib/test/test_stringprep.py b/Lib/test/test_stringprep.py
index aa71221..e763635 100644
--- a/Lib/test/test_stringprep.py
+++ b/Lib/test/test_stringprep.py
@@ -1,5 +1,5 @@
# To fully test this module, we would need a copy of the stringprep tables.
-# Since we don't have them, this test checks only a few codepoints.
+# Since we don't have them, this test checks only a few code points.
import unittest
from test import support
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index bfa262a..e4cd99b 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -1470,9 +1470,9 @@ class UnicodeTest(string_tests.CommonTest,
def test_utf8_decode_invalid_sequences(self):
# continuation bytes in a sequence of 2, 3, or 4 bytes
continuation_bytes = [bytes([x]) for x in range(0x80, 0xC0)]
- # start bytes of a 2-byte sequence equivalent to codepoints < 0x7F
+ # start bytes of a 2-byte sequence equivalent to code points < 0x7F
invalid_2B_seq_start_bytes = [bytes([x]) for x in range(0xC0, 0xC2)]
- # start bytes of a 4-byte sequence equivalent to codepoints > 0x10FFFF
+ # start bytes of a 4-byte sequence equivalent to code points > 0x10FFFF
invalid_4B_seq_start_bytes = [bytes([x]) for x in range(0xF5, 0xF8)]
invalid_start_bytes = (
continuation_bytes + invalid_2B_seq_start_bytes +