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
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