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
40e95dfc
Commit
40e95dfc
authored
Mar 29, 2014
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #21029: IDLE now colors print consistently as a keyword.
parent
3708349c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
Lib/idlelib/ColorDelegator.py
Lib/idlelib/ColorDelegator.py
+3
-0
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Lib/idlelib/ColorDelegator.py
View file @
40e95dfc
...
...
@@ -16,6 +16,9 @@ def make_pat():
kw
=
r"\b"
+
any
(
"KEYWORD"
,
keyword
.
kwlist
)
+
r"\b"
builtinlist
=
[
str
(
name
)
for
name
in
dir
(
__builtin__
)
if
not
name
.
startswith
(
'_'
)]
# We don't know whether "print" is a function or a keyword,
# so we always treat is as a keyword (the most common case).
builtinlist
.
remove
(
'print'
)
# self.file = file("file") :
# 1st 'file' colorized normal, 2nd as builtin, 3rd as string
builtin
=
r"([^.'\"\\#]\b|^)"
+
any
(
"BUILTIN"
,
builtinlist
)
+
r"\b"
...
...
Misc/NEWS
View file @
40e95dfc
...
...
@@ -265,6 +265,10 @@ IDLE
-
Issue
#
20406
:
Use
Python
application
icons
for
Idle
window
title
bars
.
Patch
mostly
by
Serhiy
Storchaka
.
-
Issue
#
21029
:
Occurrences
of
"print"
are
now
consistently
colored
as
being
a
keyword
(
the
colorizer
doesn
't know if print functions are
enabled in the source).
- Issue #17721: Remove non-functional configuration dialog help button until we
make it actually gives some help when clicked. Patch by Guilherme Simões.
...
...
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