Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
09832740
Commit
09832740
authored
Mar 26, 2009
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix isprintable() on space characters #5126
parent
59406a9d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1033 additions
and
1028 deletions
+1033
-1028
Lib/test/test_unicode.py
Lib/test/test_unicode.py
+1
-0
Misc/NEWS
Misc/NEWS
+2
-0
Objects/unicodetype_db.h
Objects/unicodetype_db.h
+1029
-1027
Tools/unicode/makeunicodedata.py
Tools/unicode/makeunicodedata.py
+1
-1
No files found.
Lib/test/test_unicode.py
View file @
09832740
...
@@ -424,6 +424,7 @@ class UnicodeTest(
...
@@ -424,6 +424,7 @@ class UnicodeTest(
def
test_isprintable
(
self
):
def
test_isprintable
(
self
):
self
.
assertTrue
(
""
.
isprintable
())
self
.
assertTrue
(
""
.
isprintable
())
self
.
assertTrue
(
" "
.
isprintable
())
self
.
assertTrue
(
"abcdefg"
.
isprintable
())
self
.
assertTrue
(
"abcdefg"
.
isprintable
())
self
.
assertFalse
(
"abcdefg
\
n
"
.
isprintable
())
self
.
assertFalse
(
"abcdefg
\
n
"
.
isprintable
())
# some defined Unicode character
# some defined Unicode character
...
...
Misc/NEWS
View file @
09832740
...
@@ -12,6 +12,8 @@ What's New in Python 3.1 alpha 2?
...
@@ -12,6 +12,8 @@ What's New in Python 3.1 alpha 2?
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue #5126: str.isprintable() returned False for space characters.
- Issue #4688: Add a heuristic so that tuples and dicts containing only
- Issue #4688: Add a heuristic so that tuples and dicts containing only
untrackable objects are not tracked by the garbage collector. This can
untrackable objects are not tracked by the garbage collector. This can
reduce the size of collections and therefore the garbage collection overhead
reduce the size of collections and therefore the garbage collection overhead
...
...
Objects/unicodetype_db.h
View file @
09832740
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Tools/unicode/makeunicodedata.py
View file @
09832740
...
@@ -375,7 +375,7 @@ def makeunicodetype(unicode, trace):
...
@@ -375,7 +375,7 @@ def makeunicodetype(unicode, trace):
flags
|=
TITLE_MASK
flags
|=
TITLE_MASK
if
category
==
"Lu"
:
if
category
==
"Lu"
:
flags
|=
UPPER_MASK
flags
|=
UPPER_MASK
if
char
==
" "
or
category
[
0
]
not
in
(
"C"
,
"Z"
):
if
char
==
ord
(
" "
)
or
category
[
0
]
not
in
(
"C"
,
"Z"
):
flags
|=
PRINTABLE_MASK
flags
|=
PRINTABLE_MASK
if
"XID_Start"
in
properties
:
if
"XID_Start"
in
properties
:
flags
|=
XID_START_MASK
flags
|=
XID_START_MASK
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment