Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19303

String interning in Python 3 - missing or moved?

Date 2012-01-24 11:38 +1100
Subject String interning in Python 3 - missing or moved?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5001.1327365518.27778.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

String interning in Python 3 - missing or moved? Chris Angelico <rosuav@gmail.com> - 2012-01-24 11:38 +1100

csiph-web