function parameter scope python 2.5.2

alex23 wuwei23 at
Fri Nov 21 00:48:46 CET 2008

On Nov 21, 9:40 am, J Kenneth King <ja... at> wrote:
> Of course, providing a shallow (or deep as necessary) copy makes it
> work, I'm curious as to why the value passed as a parameter to a
> function outside the class is passed a reference rather than a copy.

You're passing neither a reference nor a copy, you're passing the
object (in this case a list) directly:

More information about the Python-list mailing list