January 2017
Intermediate to advanced
606 pages
14h 1m
English
5.2 Scope of Objects and Names
In this chapter, we will review the objects and their mapping to names, the scope of names and parameter passing mechanisms in Python. Recall that in Python, the terms name and variable are used as synonyms.
Each object in Python is assigned a unique identifier that can be accessed using the function id.
each Python object has a unique identifier
Fig. 5.1 Program to illustrate objects and their ids (objectId.py)
On an execution of the above script (Fig. 5.1), it produced the following output:
variables a and b refer to ...