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
074d6e1f
Commit
074d6e1f
authored
25 years ago
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use 1.6-isms (s.startswith()) -- we want to distribute this
before 1.6 is out so it has to be compatible with 1.5.2.
parent
95526654
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Tools/idle/IdleConf.py
Tools/idle/IdleConf.py
+2
-2
Tools/idle/ParenMatch.py
Tools/idle/ParenMatch.py
+2
-2
No files found.
Tools/idle/IdleConf.py
View file @
074d6e1f
...
...
@@ -91,10 +91,10 @@ def load(dir):
global
_dir
_dir
=
dir
if
sys
.
platform
.
startswith
(
'win'
)
:
if
sys
.
platform
[:
3
]
==
'win'
:
genplatfile
=
os
.
path
.
join
(
dir
,
"config-win.txt"
)
# XXX don't know what the platform string is on a Mac
elif
sys
.
platform
.
startswith
(
'mac'
)
:
elif
sys
.
platform
[:
3
]
==
'mac'
:
genplatfile
=
os
.
path
.
join
(
dir
,
"config-mac.txt"
)
else
:
genplatfile
=
os
.
path
.
join
(
dir
,
"config-unix.txt"
)
...
...
This diff is collapsed.
Click to expand it.
Tools/idle/ParenMatch.py
View file @
074d6e1f
...
...
@@ -177,10 +177,10 @@ class LastOpenBracketFinder:
if
i
is
None
\
or
keysym_type
(
buf
[
i
])
!=
right_keysym_type
:
return
None
lines_back
=
buf
[
i
:].
count
(
"
\
n
"
)
-
1
lines_back
=
string
.
count
(
buf
[
i
:],
"
\
n
"
)
-
1
# subtract one for the "\n" added to please the parser
upto_open
=
buf
[:
i
]
j
=
upto_open
.
rfind
(
"
\
n
"
)
+
1
# offset of column 0 of line
j
=
string
.
rfind
(
upto_open
,
"
\
n
"
)
+
1
# offset of column 0 of line
offset
=
i
-
j
return
"%d.%d"
%
(
lno
-
lines_back
,
offset
)
...
...
This diff is collapsed.
Click to expand it.
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