String interning in Python 3 - missing or moved?

C

Chris Angelico

Python 2 can intern 'str' (bytes) strings (with the eponymous builtin,
and with C API functions), though not unicode. Python 3 does not have
that builtin, nor the C API; I can't find any support for either str
or bytes.

Has it been moved, or is interning as a concept deprecated?

I don't have a use case, just curiosity at the moment - looking into
various languages' dictionary/mapping implementations (Python hashes
strings for each dict, Lua interns them - by basically putting them
all into one huge hashtable).

ChrisA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top