Finding the instance reference of an object [long and probably boring]

greg greg at
Tue Nov 11 04:34:22 CET 2008

Aaron Brady wrote:

> I thought of another way Python's passing method could be
> implemented.  Parameters are passed as namespace-name pairs, and every
> time a variable occurs, it's looked up in the namespace it's in.  If
> it's changed (concurrently) in the outer scope, a copy is made into
> the inner scope.  If it's changed in the inner scope, a new entry is
> added there.

That sounds like a kind of copy-on-write. It's certainly not
call-by-value by any sane interpretation (contrary to your
assertion that "all calling is call-by-value").


More information about the Python-list mailing list