]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport patch: Use ascii_letters to avoid UnicodeErrors.
authorRaymond Hettinger <python@rcn.com>
Mon, 23 Sep 2002 14:23:15 +0000 (14:23 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 23 Sep 2002 14:23:15 +0000 (14:23 +0000)
Tools/idle/CallTips.py

index 0a9eb30c3b754f1efc4f0c7258fc5d14fe0e58b0..dc25083e7eb85e2cffac7e3c75f0f69f5685a68b 100644 (file)
@@ -76,7 +76,10 @@ class CallTips:
         return "" #so the event is handled normally.
 
     def get_object_at_cursor(self,
-                             wordchars="._" + string.uppercase + string.lowercase + string.digits):
+                             wordchars="._" + string.ascii_letters + string.digits):
+        # Usage of ascii_letters is necessary to avoid UnicodeErrors
+        # if chars contains non-ASCII.
+
         # XXX - This needs to be moved to a better place
         # so the "." attribute lookup code can also use it.
         text = self.text