When i say,
>>>radius = 2
Internally, a new object by name radius is created in __main__ module's global frame and this object is of class int. Reference variable is also created by name radius which points to that object.
When i say,
>>>from math import sqrt
Internally, a new object by name sqrt is created in __main__ module's global frame and this object is of class function. Reference variable is also created by name sqrt which points to that object of function type.
when i say,
>>>def square(x):
return mul(x,x)
Internally, a new object by name square is created in __main__ module's global frame and this object is of class function. Reference variable is also created by name square which points to that object of function type.
My question:
Is my understanding correct?
or
Does radius and sqrt and square objects are created outside __main__ module's global frame and reference variables(radius sqrt square) sitting within __main__ module's global frame point to these objects?
In CS61A Fall 2012 course, the teacher says, this is how it is, which looks like hiding many details of python program memory model.

radiusis created" is wrong. Read: A Word About Names and Objectsradius(not an object) which references the sameintobject referenced by the literal2.