On Wed, 30 Oct 2013 16:34:33 +0000
Nigel Small <ni...@nigelsmall.com> wrote:
> It strikes me that there could be an alternative approach to some of the
> use cases discussed here. Instead of a new type of dictionary, the
> case-insensitivity problem could be solved with something akin to a *
> CaseInsensitiveString* class used for keys within a standard dictionary.
> This would be very similar to a normal string except with comparison and
> hashing. It would mean that CaseInsensitiveString("Foo") is considered
> equal to CaseInsensitiveString("foo") and allow code such as the following:

And how does a case-insensitive string compare with a normal
(case-sensitive) string? This is a can of worms.

(if you answer, please don't answer in this thread but open a separate
one for case-insensitive strings, thanks)

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to