Is 'everything' a refrence or isn't it?

Mike Meyer mwm at
Sat Jan 7 15:25:25 EST 2006

Terry Hancock <hancock at> writes:
> On Sat, 07 Jan 2006 01:29:46 -0500
> Mike Meyer <mwm at> wrote:
>> From what I can tell, Liskov proposed *three* different
>> names for
>> passing references to objects: call-by-sharing,
>> call-by-object, and call-by-object-reference.
> "Call by object reference" makes the most sense to me. Names
> in Python are object references: they refer to objects.  You
> might almost say "call by name" but that sort of implies
> that you are passing the strings around (which is generally
> untrue)

"Call by name" has a specific meaning that is different from passing
strings around. CBName (and CBNeed) is generally implemented by
passing thunks. In Python, you could do CBN by passing tuples of
(string, globals(), locals()) around - which probably makes enough
noise when it hits the stack to qualify as a thunk.

Mike Meyer <mwm at>
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

More information about the Python-list mailing list