On 10/9/07, Thomas Lee <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > > > The point is that a bytes and a str instance are never considered equal... > > > > > Sorry. I understand now. My brain must have been on a holiday earlier. > :) Just pushed an updated patch to the bug tracker. > >> str8() == str() -> False > >> str8() != str() -> True > >> > >> Correct? > >> > > > > Well, in this case you actually have to compare the individual bytes. > > But yes. ;-) > > > I'm confused: if I'm making == and != between PyString return False > instead of converting, at what point would I need to be comparing bytes? > > The fix I have ready for this merely wipes out the conversion from > PyString to PyUnicode in PyUnicode_Compare and the existing code takes > care of the rest. Is this all that's required, or have I misinterpreted > this one too? :)
Sorry, my bad. I misread and though you were talking about PyString vs. PyBytes. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ 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
