[Cython] CEP1000: Native dispatch through callables

Nathaniel Smith njs at pobox.com
Fri Apr 13 14:25:38 CEST 2012

On Fri, Apr 13, 2012 at 12:59 PM, Dag Sverre Seljebotn
<d.s.seljebotn at astro.uio.no> wrote:
> I'll go one further: Intern Python bytes objects. It's just a PyObject*, but
> it's *required* (or just strongly encouraged) to have gone through
> sig = sys.modules['_nativecall']['interned_db'].setdefault(sig, sig)
> Obviously in a PEP you'd have a C-API function for such interning
> (completely standalone utility). Performance of interning operation itself
> doesn't matter...
> Unless CPython has interning features itself, like in Java? Was that present
> back in the day and then ripped out?

http://docs.python.org/library/functions.html#intern ? (C API:
PyString_InternInPlace, moved from __builtin__.intern to sys.intern in

- N

More information about the cython-devel mailing list