[Python-Dev] unicode hell/mixing str and unicode as dictionary keys

Giovanni Bajo rasky at develer.com
Fri Aug 4 10:58:16 CEST 2006


M.-A. Lemburg <mal at egenix.com> wrote:

>> At the very least, in the context of a dictionary
>> lookup.
>
> The point here is that a typical user won't expect any comparisons
> to be made when dealing with dictionaries, simply because the fact
> that you do need to make comparisons is an implementation detail.


I'd also weight in the fact that this is a change of behaviour since the
introduction of unicode in 2.0, and it's break real-world applications (as
demonstrated by this thread). I think Python ought to revert to the previous
behaviour and, in case there's interest, the discussion moved to the py3k list.

Giovanni Bajo



More information about the Python-Dev mailing list