assigning values in python and perl

J. Peng peng.kyo at
Thu Jan 17 07:11:57 CET 2008

On Jan 17, 2008 1:54 PM, Mel <mwilson at> wrote:
> test(a) (along with def test(x)) takes the object named 'a' in the
> current namespace and binds it with the name 'x' in function test's
> local namespace.  So, inside test, the name 'x' starts by referring to
>    the list that contains [1,2,3].  But the only use test makes of the
> name 'x' is to re-bind it to a new list [4,5,6].  Exiting test, the
> local namespace is thrown away.


Yes I know it pretty well now, but thanks for the pointer.
What I asked is that, if we re-write that code with perl or C, we'll
get different results.

More information about the Python-list mailing list