On Wed, 04 Jan 2006 22:51:03 -0500, Mike Meyer wrote: >> And if you only ever passed immutable objects around, you would >> think Python was call by value. > > You might. Then again, you might also understand the concepts well > enough to realize that there isn't any difference between CBR and CBV > when you're passing immutable objects.
Consider this: def do_nothing(x): pass huge_tuple = (None,) * 10000**4 do_nothing(huge_tuple) If Python made a copy of huge_tuple before passing it to the function, you would notice. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list