Guido van Rossum
Fred L. Drake, Jr., editor
October 14, 2002 (Release 2.2.2)
Copyright © 2001 Python Software Foundation. All rights reserved.
Copyright © 2000 BeOpen.com. All rights reserved.
Copyright © 1995-2000 Corporation for National Research Initiatives. All rights reserved.
Copyright © 1991-1995 Stichting Mathematisch Centrum. All rights reserved.
Actually, call by object reference would be a better description, since if a mutable object is passed, the caller will see any changes the callee makes to it (items inserted into a list).
The rules for comparing objects of different types should not be relied upon; they may change in a future version of the language.
In fact function definitions are also `statements' that are `executed'; the execution enters the function name in the module's global symbol table.
Except for one thing. Module objects have a secret read-only attribute called
__dict__ which returns the dictionary used to implement the module's namespace; the name
__dict__ is an attribute but not a global name. Obviously, using this violates the abstraction of namespace implementation, and should be restricted to things like post-mortem debuggers.
Python will execute the contents of a file identified by the ‘PYTHONSTARTUP’ environment variable when you start an interactive interpreter.