[Python-checkins] CVS: python/dist/src/Tools/idle PyShell.py,1.34,1.35
Fred L. Drake
fdrake@users.sourceforge.net
Fri, 20 Jul 2001 11:58:44 -0700
Update of /cvsroot/python/python/dist/src/Tools/idle
In directory usw-pr-cvs1:/tmp/cvs-serv32544/idle
Modified Files:
PyShell.py
Log Message:
Use string.ascii_letters instead of string.letters (SF bug #226706).
Move computation of sets of characters out of the body of the function that
uses them.
Index: PyShell.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/idle/PyShell.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -r1.34 -r1.35
*** PyShell.py 2001/07/06 20:26:31 1.34
--- PyShell.py 2001/07/20 18:58:42 1.35
***************
*** 37,40 ****
--- 37,43 ----
+ IDENTCHARS = string.ascii_letters + string.digits + "_"
+
+
# Note: <<newline-and-indent>> event is defined in AutoIndent.py
***************
*** 218,222 ****
text.see(pos)
char = text.get(pos)
! if char and char in string.letters + string.digits + "_":
text.tag_add("ERROR", pos + " wordstart", pos)
self.tkconsole.resetoutput()
--- 221,225 ----
text.see(pos)
char = text.get(pos)
! if char and char in IDENTCHARS:
text.tag_add("ERROR", pos + " wordstart", pos)
self.tkconsole.resetoutput()