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
91355db6
Commit
91355db6
authored
Nov 21, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix an issue with str.translate() in IDLE -- str.translate() only accepts
a dict argument now.
parent
509d7370
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Lib/idlelib/PyParse.py
Lib/idlelib/PyParse.py
+4
-3
No files found.
Lib/idlelib/PyParse.py
View file @
91355db6
...
...
@@ -94,15 +94,16 @@ _chew_ordinaryre = re.compile(r"""
# Build translation table to map uninteresting chars to "x", open
# brackets to "(", and close brackets to ")".
_tran
=
[
'x'
]
*
256
_tran
=
{}
for
i
in
range
(
256
):
_tran
[
i
]
=
'x'
for
ch
in
"({["
:
_tran
[
ord
(
ch
)]
=
'('
for
ch
in
")}]"
:
_tran
[
ord
(
ch
)]
=
')'
for
ch
in
"
\
"
'
\
\
\
n
#"
:
_tran
[
ord
(
ch
)]
=
ch
_tran
=
''
.
join
(
_tran
)
del
ch
del
i
,
ch
class
Parser
:
...
...
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