[issue3240] IDLE environment corrupts string.letters

Roger Upole report at bugs.python.org
Tue Jul 1 22:06:57 CEST 2008


Roger Upole <rupole at hotmail.com> added the comment:

It introduces high characters that cause comparisons to fail under IDLE 
that succeed from the normal python prompt:

Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit 
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import string
>>> u'a' in string.letters
True


IDLE 1.2.2      
>>> import string
>>> u'a' in string.letters

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    u'a' in string.letters
UnicodeDecodeError: 'ascii' codec can't decode byte 0x83 in position 
52: ordinal not in range(128)

Or am I misunderstanding how the locale works with string comparisons ?

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3240>
_______________________________________


More information about the Python-bugs-list mailing list