dict: retrieve the original key by key

Chris Rebert clp2 at rebertia.com
Sun May 15 17:19:42 EDT 2011


On Sun, May 15, 2011 at 1:53 PM, Terry Reedy <tjreedy at udel.edu> wrote:
> On 5/15/2011 6:46 AM, Christoph Groth wrote:
<snip>
>> But hey, they keys of my dictionary are actually strings, so I can use
>> the built-in intern.  Somehow, I have never stumbled accross this
>> built-in function so far.
>
> It was, however, removed in 3.x as a seldom-externally-used internal
> implementation detail.

Still exists in sys module though:
http://docs.python.org/dev/library/sys.html#sys.intern

Cheers,
Chris



More information about the Python-list mailing list