[Python-Dev] unicode hell/mixing str and unicode as dictionary keys
Bob Ippolito
bob at redivi.com
Fri Aug 4 04:58:47 CEST 2006
On Aug 3, 2006, at 6:51 PM, Greg Ewing wrote:
> M.-A. Lemburg wrote:
>
>> Perhaps we ought to add an exception to the dict lookup mechanism
>> and continue to silence UnicodeErrors ?!
>
> Seems to be that comparison of unicode and non-unicode
> strings for equality shouldn't raise exceptions in the
> first place.
Seems like a slightly better idea than having dictionaries suppress
exceptions. Still not ideal though because sticking non-ASCII strings
that are supposed to be text and unicode in the same data structures
is *probably* still an error.
-bob
More information about the Python-Dev
mailing list