Adam Hupp wrote:
> Would it make sense to have dict ignore TypeError on lookups?
> Alternatively, the byte/str comparison could throw a specific subclass
> of TypeError that dict ignored e.g. IncompatibleComparisonError.

Presumably the reason for making strings and bytes uncomparable
in the first place is to catch errors due to unwittingly mixing
strings and bytes. Having dicts ignore the exception would
partly defeat that.

I'm not all that comfortable with the idea of having things
that can't even be compared for equality. Is this meant to be
a permanent feature of the language, or just something to help
people get over the transition? Could it be dropped once
everyone has got over the shock of having strings and bytes
being different things?

--
Greg
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to