Martin v. Löwis wrote: > M.-A. Lemburg schrieb: >> Hiding programmer errors is not making life easier in the >> long run, so I'm -1 on having the equality comparison return >> False. > > There is no error to hide here. The objects are inequal, period.
And in the case of dicts it hides errors randomly... > >> Instead we should generate a warning in Python 2.5 and introduce >> the exception in Python 2.6. > > A warning about what? That you can't put byte string and Unicode > strings into the same dictionary (as keys)? Next we start not allowing > to put numbers and strings into the same dictionary, because there > is no conversion defined between them? A warning that an exception has been ignored while adding a key to a dict, I guess. I'd see keep those dict changes, this is where real programmer errors are hidden. >> I disagree with this part. >> >> Failure to decode a string doesn't imply inequality. > > If the failure is "these bytes don't have a meaningful character > interpretation", then the bytes are *clearly* not equal to > some character string. One could also think of a "magic encoding", which decodes non-ascii strings to None, making them compare unequal to any unicode string. _______________________________________________ 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