[Python-Dev] Non-string keys in type dict

Maciej Fijalkowski fijall at gmail.com
Thu Mar 8 07:50:41 CET 2012


On Wed, Mar 7, 2012 at 5:42 PM, Benjamin Peterson <benjamin at python.org> wrote:
> 2012/3/7 Victor Stinner <victor.stinner at gmail.com>:
>> So my question is: what is the use case of such dict? Why do we still
>> support it?
>
> Probably a side-effect of implementation.
>
>> Can't we simply raise an error if the dict contains
>> non-string keys?
>
> Sounds okay to me.
>
>
> --
> Regards,
> Benjamin
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fijall%40gmail.com

I think the original reason given was that enforcing the type would
make a performance hit, but I might be misremembering.


More information about the Python-Dev mailing list