Guido van Rossum schrieb: > Hmm... Here's an idea... How about we change unicode-vs-str __eq__ to > issue a warning (and return False) instead of raising > UnicodeException?
I'm in favour of having this __eq__ just return False. I don't think the warning is necessary, and believe that people will complain about getting it, but if that is the only way to achieve consensus, so be it. > A warning would arguably have the same helping effect. (I suspect > actually that we would have used warnings all along except we didn't > have the warning framework when unicode was first introduced.) I believe we would have neither had we rich comparisons available at the time. That unicode-vs-str-__eq__ raises an exception is just a fall-out of not supporting __cmp__ (and it is good that __cmp__ is not supported - there is no meaningful way to order str/unicode if the string is not in the system encoding). Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com