]> granicus.if.org Git - python/commitdiff
Use ascii_letters to avoid UnicodeErrors.
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 5 Aug 2002 14:53:52 +0000 (14:53 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 5 Aug 2002 14:53:52 +0000 (14:53 +0000)
Tools/idle/CallTips.py

index 0a9eb30c3b754f1efc4f0c7258fc5d14fe0e58b0..412a2e685399f0de9c0e2675a97cc5340909d0a3 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