diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-08-05 14:53:52 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-08-05 14:53:52 (GMT) |
commit | 5428fff1111dac0a3308f33a576cce8de33f18dd (patch) | |
tree | 9c520a29d8d79e487b9b6ec52ea8900daf6fcdc9 /Tools/idle | |
parent | de392d3f3fac212469f5bee4541aaea9af05de6a (diff) | |
download | cpython-5428fff1111dac0a3308f33a576cce8de33f18dd.zip cpython-5428fff1111dac0a3308f33a576cce8de33f18dd.tar.gz cpython-5428fff1111dac0a3308f33a576cce8de33f18dd.tar.bz2 |
Use ascii_letters to avoid UnicodeErrors.
Diffstat (limited to 'Tools/idle')
-rw-r--r-- | Tools/idle/CallTips.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/idle/CallTips.py b/Tools/idle/CallTips.py index 0a9eb30..412a2e6 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 |