Marc-Andre Lemburg added the comment:

The change we did was for == and != comparisons to always work (they now
"raise" warnings) - mostly because doing otherwise resulted in strange
exceptions when dealing with dictionary lookups. 

However, this was not done for comparisons <, <=, >=, > since these test
for ordering and it's not at all clear what the default outcome should be.

>>> u'abc' == 'äöü'
UnicodeWarning: Unicode equal comparison failed to convert both
arguments to Unicode - interpreting them as being unequal
False

>>> u'abc' < 'äöü'
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0:
ordinal not in range(128)

>>> 1 < 1j
TypeError: no ordering relation is defined for complex numbers

----------
nosy: +lemburg

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1997>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to