I like to think of this as "call-by-name". That's because every name in python is actually a lookup in a dictionary mapping strings to values. This is different from languages like C# and Java where some things such as class and function references can actually be thought of as "values". In python, everything that isn't a keyword or a literal is a name, thinking otherwise leads to gotchas.
Comments
I like to think of this as "call-by-name". That's because every name in python is actually a lookup in a dictionary mapping strings to values. This is different from languages like C# and Java where some things such as class and function references can actually be thought of as "values". In python, everything that isn't a keyword or a literal is a name, thinking otherwise leads to gotchas.
The term call-by-name already exists and means something entirely different. It will blow your mind. http://www.cs.sfu.ca/~cameron/Teaching/383/PassByName.html