diff options
author | Kurt B. Kaiser <kbk@shore.net> | 2002-09-17 03:43:38 (GMT) |
---|---|---|
committer | Kurt B. Kaiser <kbk@shore.net> | 2002-09-17 03:43:38 (GMT) |
commit | d8e20a0e6b597419b8bbec9cd7d76f3ea5067679 (patch) | |
tree | 4341b48273d95159dc81037241a3916bd8fc84df /Lib/idlelib/ParenMatch.py | |
parent | 7827e1707c3727f51b553881bb389adf42b016e6 (diff) | |
download | cpython-d8e20a0e6b597419b8bbec9cd7d76f3ea5067679.zip cpython-d8e20a0e6b597419b8bbec9cd7d76f3ea5067679.tar.gz cpython-d8e20a0e6b597419b8bbec9cd7d76f3ea5067679.tar.bz2 |
Merge Py Idle changes:
Rev 1.6 doerwalter
(string methods)
Diffstat (limited to 'Lib/idlelib/ParenMatch.py')
-rw-r--r-- | Lib/idlelib/ParenMatch.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/idlelib/ParenMatch.py b/Lib/idlelib/ParenMatch.py index db6fb6c..678d1fd 100644 --- a/Lib/idlelib/ParenMatch.py +++ b/Lib/idlelib/ParenMatch.py @@ -10,8 +10,6 @@ We'll have to fix IDLE to do something reasonable when two or more extensions what to capture the same event. """ -import string - import PyParse from AutoIndent import AutoIndent, index2line from configHandler import idleConf @@ -166,10 +164,10 @@ class LastOpenBracketFinder: if i is None \ or keysym_type(buf[i]) != right_keysym_type: return None - lines_back = string.count(buf[i:], "\n") - 1 + lines_back = buf[i:].count("\n") - 1 # subtract one for the "\n" added to please the parser upto_open = buf[:i] - j = string.rfind(upto_open, "\n") + 1 # offset of column 0 of line + j = upto_open.rfind("\n") + 1 # offset of column 0 of line offset = i - j return "%d.%d" % (lno - lines_back, offset) |