summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-10-27 06:00:57 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-10-27 06:00:57 (GMT)
commitfdb73ed4863c31a3d807f9f75ef3d5d6f4d8d4e8 (patch)
tree55e0be7f34d9dd9510474dcfa5b5a73ab8d21f15
parent8f8ca765d020f1b2be39d959f98f242a9dedd1bb (diff)
downloadcpython-fdb73ed4863c31a3d807f9f75ef3d5d6f4d8d4e8.zip
cpython-fdb73ed4863c31a3d807f9f75ef3d5d6f4d8d4e8.tar.gz
cpython-fdb73ed4863c31a3d807f9f75ef3d5d6f4d8d4e8.tar.bz2
Issue #19405: Fixed outdated comments in the _sre module.
-rw-r--r--Lib/sre_compile.py8
-rw-r--r--Modules/_sre.c3
2 files changed, 5 insertions, 6 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index bd40705..471753e 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -276,10 +276,10 @@ def _mk_bitmap(bits):
# set is constructed. Then, this bitmap is sliced into chunks of 256
# characters, duplicate chunks are eliminated, and each chunk is
# given a number. In the compiled expression, the charset is
-# represented by a 16-bit word sequence, consisting of one word for
-# the number of different chunks, a sequence of 256 bytes (128 words)
+# represented by a 32-bit word sequence, consisting of one word for
+# the number of different chunks, a sequence of 256 bytes (64 words)
# of chunk numbers indexed by their original chunk position, and a
-# sequence of chunks (16 words each).
+# sequence of 256-bit chunks (8 words each).
# Compression is normally good: in a typical charset, large ranges of
# Unicode will be either completely excluded (e.g. if only cyrillic
@@ -294,7 +294,7 @@ def _mk_bitmap(bits):
# In UCS-4 mode, the BIGCHARSET opcode still supports only subsets
# of the basic multilingual plane; an efficient representation
-# for all of UTF-16 has not yet been developed. This means,
+# for all of Unicode has not yet been developed. This means,
# in particular, that negated charsets cannot be represented as
# bigcharsets.
diff --git a/Modules/_sre.c b/Modules/_sre.c
index a7103cc..bf802a6 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -2753,8 +2753,7 @@ _compile(PyObject* self_, PyObject* args)
\_________\_____/ /
\____________/
- It also helps that SRE_CODE is always an unsigned type, either 2 bytes or 4
- bytes wide (the latter if Python is compiled for "wide" unicode support).
+ It also helps that SRE_CODE is always an unsigned type.
*/
/* Defining this one enables tracing of the validator */