[Python-Dev] unicode hell/mixing str and unicode as dictionary keys
Armin Rigo
arigo at tunes.org
Mon Aug 7 17:55:00 CEST 2006
Hi,
On Thu, Aug 03, 2006 at 07:53:11PM +0200, M.-A. Lemburg wrote:
> > I though I'd heard (from Guido here or on the py3k list) that it was only
> > 1 < u'abc' that would raise an exception, and that 1 == u'abc' would still
> > evaluate to False. Did I misunderstand?
>
> Could be that I'm wrong.
I also seem to remember that TypeErrors should only signal ordering
non-sense, not equality. In this case, I'm on the opinion that unicode
objects and completely-unrelated strings of random bytes should
successfully compare as unequal, but I'm not enough of a unicode user to
be sure.
A bientot,
Armin.
More information about the Python-Dev
mailing list