Thomas Lee wrote:
> Guido van Rossum wrote:
>
>> - make == and != between PyBytes and PyUnicode return False instead of
>> raising TypeError
>>
A patch for this is ready. I'll submit it to the bug tracker later tonight.
>> - make == and != between PyString and Pyunicode return False instead
>> of converting
>>
This will be trivial, but I need to ask a stupid question: is this also
true for PyUnicode_Compare? (i.e. should PyUnicode_Compare(str8(),
str()) != 0 ?)
And, if so, what should PyUnicode_Compare actually return if one of the
parameters is a PyString? Maybe -1 for PyUnicode on the left, 1 for
PyUnicode on the right?
>> - make comparisons between PyString and PyBytes work (these are
>> properly ordered)
>>
>>
Is it just me, or do string/bytes comparisons already work?
>>> s = str8('test')
>>> b = b'test'
>>> s == b
True
>>> b == s
True
>>> s != b
False
>>> b != s
False
Cheers,
Tom
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com