Skip to content

Commit 82e07b9

Browse files
Issue #23181: More "codepoint" -> "code point".
2 parents acdb7c1 + d3faf43 commit 82e07b9

File tree

17 files changed

+28
-28
lines changed

17 files changed

+28
-28
lines changed

Doc/library/json.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ The RFC does not explicitly forbid JSON strings which contain byte sequences
514514
that don't correspond to valid Unicode characters (e.g. unpaired UTF-16
515515
surrogates), but it does note that they may cause interoperability problems.
516516
By default, this module accepts and outputs (when present in the original
517-
:class:`str`) codepoints for such sequences.
517+
:class:`str`) code points for such sequences.
518518

519519

520520
Infinite and NaN Number Values

Lib/codecs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class Codec:
124124
Python will use the official U+FFFD REPLACEMENT
125125
CHARACTER for the builtin Unicode codecs on
126126
decoding and '?' on encoding.
127-
'surrogateescape' - replace with private codepoints U+DCnn.
127+
'surrogateescape' - replace with private code points U+DCnn.
128128
'xmlcharrefreplace' - Replace with the appropriate XML
129129
character reference (only for encoding).
130130
'backslashreplace' - Replace with backslashed escape sequences

Lib/email/message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def get_payload(self, i=None, decode=False):
273273
bpayload = payload.encode('ascii')
274274
except UnicodeError:
275275
# This won't happen for RFC compliant messages (messages
276-
# containing only ASCII codepoints in the unicode input).
276+
# containing only ASCII code points in the unicode input).
277277
# If it does happen, turn the string into bytes in a way
278278
# guaranteed not to fail.
279279
bpayload = payload.encode('raw-unicode-escape')

Lib/html/entities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__all__ = ['html5', 'name2codepoint', 'codepoint2name', 'entitydefs']
44

55

6-
# maps the HTML entity name to the Unicode codepoint
6+
# maps the HTML entity name to the Unicode code point
77
name2codepoint = {
88
'AElig': 0x00c6, # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1
99
'Aacute': 0x00c1, # latin capital letter A with acute, U+00C1 ISOlat1
@@ -2495,7 +2495,7 @@
24952495
'zwnj;': '\u200c',
24962496
}
24972497

2498-
# maps the Unicode codepoint to the HTML entity name
2498+
# maps the Unicode code point to the HTML entity name
24992499
codepoint2name = {}
25002500

25012501
# maps the HTML entity name to the character

Lib/test/multibytecodec_support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TestBase:
2121
roundtriptest = 1 # set if roundtrip is possible with unicode
2222
has_iso10646 = 0 # set if this encoding contains whole iso10646 map
2323
xmlcharnametest = None # string to test xmlcharrefreplace
24-
unmappedunicode = '\udeee' # a unicode codepoint that is not mapped.
24+
unmappedunicode = '\udeee' # a unicode code point that is not mapped.
2525

2626
def setUp(self):
2727
if self.codec is None:

Lib/test/test_html.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ def check_num(num, expected):
4848
check(s % num, char)
4949
for end in [' ', 'X']:
5050
check((s+end) % num, char+end)
51-
# check invalid codepoints
51+
# check invalid code points
5252
for cp in [0xD800, 0xDB00, 0xDC00, 0xDFFF, 0x110000]:
5353
check_num(cp, '\uFFFD')
54-
# check more invalid codepoints
54+
# check more invalid code points
5555
for cp in [0x1, 0xb, 0xe, 0x7f, 0xfffe, 0xffff, 0x10fffe, 0x10ffff]:
5656
check_num(cp, '')
5757
# check invalid numbers

Lib/test/test_multibytecodec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_stateless(self):
8080
self.assertEqual(encoder.reset(), None)
8181

8282
def test_stateful(self):
83-
# jisx0213 encoder is stateful for a few codepoints. eg)
83+
# jisx0213 encoder is stateful for a few code points. eg)
8484
# U+00E6 => A9DC
8585
# U+00E6 U+0300 => ABC4
8686
# U+0300 => ABDC

Lib/test/test_stringprep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# To fully test this module, we would need a copy of the stringprep tables.
2-
# Since we don't have them, this test checks only a few codepoints.
2+
# Since we don't have them, this test checks only a few code points.
33

44
import unittest
55
from test import support

Lib/test/test_unicode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,9 +1470,9 @@ def test_utf8_decode_valid_sequences(self):
14701470
def test_utf8_decode_invalid_sequences(self):
14711471
# continuation bytes in a sequence of 2, 3, or 4 bytes
14721472
continuation_bytes = [bytes([x]) for x in range(0x80, 0xC0)]
1473-
# start bytes of a 2-byte sequence equivalent to codepoints < 0x7F
1473+
# start bytes of a 2-byte sequence equivalent to code points < 0x7F
14741474
invalid_2B_seq_start_bytes = [bytes([x]) for x in range(0xC0, 0xC2)]
1475-
# start bytes of a 4-byte sequence equivalent to codepoints > 0x10FFFF
1475+
# start bytes of a 4-byte sequence equivalent to code points > 0x10FFFF
14761476
invalid_4B_seq_start_bytes = [bytes([x]) for x in range(0xF5, 0xF8)]
14771477
invalid_start_bytes = (
14781478
continuation_bytes + invalid_2B_seq_start_bytes +

Modules/cjkcodecs/_codecs_cn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#undef hz
1616
#endif
1717

18-
/* GBK and GB2312 map differently in few codepoints that are listed below:
18+
/* GBK and GB2312 map differently in few code points that are listed below:
1919
*
2020
* gb2312 gbk
2121
* A1A4 U+30FB KATAKANA MIDDLE DOT U+00B7 MIDDLE DOT

0 commit comments

Comments
 (0)