Python from Wise Guy's Viewpoint

Terry Reedy tjreedy at udel.edu
Sun Oct 19 17:41:18 EDT 2003


"Frode Vatvedt Fjeld" <frodef at cs.uit.no> wrote in message
news:2hn0bxm8kf.fsf at vserver.cs.uit.no...
cc'ed in case you are not reading c.l.python, which I am limiting this
to.

> So to get from the ID to the bytecode, you go through a dictionary?
> And the mapping from name to ID happens perhaps when the caller is
> bytecode-compiled?

No.  In Python, all names are associated with objects in namespaces.
Lookup is done as needed at the appropriate runtime.  Function objects
are 1st class and are no different from any others in this respect.
The same goes for slots in collection objects being associated with
member objects.

The free online tutorial as www.python.org explains Python basics like
this.

Terry J. Reedy








More information about the Python-list mailing list