[Python-Dev] PEP 455: TransformDict

Nigel Small nigel at nigelsmall.com
Wed Oct 30 19:32:53 CET 2013


True, but I could similarly argue that the nice thing about
CaseInsensitiveString is it is usable for much more than dictionary keys -
it just depends on your point of view.

There would be nothing stopping other types of dictionary key
transformation being covered by other key data types in a similar way, I'm
simply trying to raise the question of where the genericity could sit: in
the dictionary or in the key.

Nigel


On 30 October 2013 17:04, Ethan Furman <ethan at stoneleaf.us> wrote:

> On 10/30/2013 09:34 AM, Nigel Small 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 [...]
>>
>
> The nice thing about the TransformDict is it is usable for much more than
> simple case-insensitivity.
>
>
> --
> ~Ethan~
> ______________________________**_________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/**mailman/listinfo/python-dev<https://mail.python.org/mailman/listinfo/python-dev>
> Unsubscribe: https://mail.python.org/**mailman/options/python-dev/**
> nigel%40nigelsmall.com<https://mail.python.org/mailman/options/python-dev/nigel%40nigelsmall.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20131030/db312fe5/attachment-0001.html>


More information about the Python-Dev mailing list