From: Raymond Hettinger Date: Mon, 23 Sep 2002 14:23:15 +0000 (+0000) Subject: Backport patch: Use ascii_letters to avoid UnicodeErrors. X-Git-Tag: v2.2.2b1~159 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1124a3b50b7d47b05b93526b62d3118283c6921c;p=thirdparty%2FPython%2Fcpython.git Backport patch: Use ascii_letters to avoid UnicodeErrors. --- diff --git a/Tools/idle/CallTips.py b/Tools/idle/CallTips.py index 0a9eb30c3b75..dc25083e7eb8 100644 --- a/Tools/idle/CallTips.py +++ b/Tools/idle/CallTips.py @@ -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