String interning in Python 3 - missing or moved?

Chris Rebert clp2 at rebertia.com
Mon Jan 23 21:25:50 EST 2012


On Mon, Jan 23, 2012 at 4:38 PM, Chris Angelico <rosuav at gmail.com> wrote:
> 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?

The former, into `sys`:
http://docs.python.org/dev/library/sys.html#sys.intern
Search the "What's New"s in the future.
http://docs.python.org/release/3.1.3/whatsnew/3.0.html#builtins

Cheers,
ChrisR



More information about the Python-list mailing list