26.10.20 10:10, Inada Naoki пише:
> Of course, there are some runtime costs too.
> 
> https://github.com/python/cpython/blob/fb5db7ec58624cab0797b4050735be865d380823/Modules/_functoolsmodule.c#L802
> https://github.com/python/cpython/blob/fb5db7ec58624cab0797b4050735be865d380823/Objects/codeobject.c#L724
> (maybe more, but I'm not sure)

It will not help much in these cases because we still need to
distinguish 1 from True and 1.0 and -0.0 from 0.0.

But if keys only can be str or bytes, we pay additional cost. An example
is the re cache.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/S4B7KIIEB5XRPE4WKDXMSN424DJGNGBC/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to