[New-bugs-announce] [issue1997] unicode and string compare should not cause an exception

Aaron Watters report at bugs.python.org
Fri Feb 1 22:18:45 CET 2008


New submission from Aaron Watters:

As I understand it comparisons between two objects should
always work.  I get this at the interpreter prompt:

Python 2.6a0 (trunk, Jan 11 2008, 11:40:59) 
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> unichr(0xffff) < chr(128)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 0:
ordinal not in range(128)
>>> 

I think the fix for this case is to do something
arbitrary but consistent if possible?

----------
components: Interpreter Core
messages: 61976
nosy: aaron_watters
severity: normal
status: open
title: unicode and string compare should not cause an exception
type: behavior
versions: Python 2.6

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1997>
__________________________________


More information about the New-bugs-announce mailing list