A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-February/019923.html below:

[Python-Dev] Accessing globals without dict lookup

[Python-Dev] Accessing globals without dict lookup [Python-Dev] Accessing globals without dict lookupKa-Ping Yee ping@lfw.org
Mon, 11 Feb 2002 07:22:27 -0600 (CST)
On Mon, 11 Feb 2002, Ka-Ping Yee wrote:
>         This simplifies things further:
>
>             PyObject* cell_get(PyGlobalCell* c)
>             {
>                 return c->cell_cellptr->cell_objptr;
>             }

I forgot to mention that this would also add loopback cellptrs for
the two cells pointed to by __builtin__.abs and __builtin__.max.

But hey... in that case the cellptr is always two steps away from
the object.  So why not just use PyObject**s instead of cells?

    dict -> ptr -> ptr -> object

(Or, if we want to maintain backward compatibility with existing
dictionaries, let a cell be an object, so we can check its type,
and have it contain just one pointer instead of two?)

Am i out to lunch?


-- ?!ng




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4