On 2019-12-03 8:44 p.m., Greg Ewing wrote:
On 4/12/19 7:26 am, Andrew Barnert via Python-ideas wrote:
If you’re using interning for functionality, to distinguish two equal strings that came from different inputs or processes, your code is probably broken.

That's not what interning is normally used for. Usually it's
to allow test for equality to be replaced by tests for identity.


That's not what interning is normally used for. It's for lowering RAM usage.

Okay, sometimes it's also used for that. But the main use-case is for lowering RAM usage for immutable objects.

Granted, Python doesn't have immutable objects, so you're basically just hoping nobody messes with the returned objects...
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/IDJVKG72BQNDT5UBL5TSATI2VLDQNOHK/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to