assigning values in python and perl

J. Peng peng.kyo at gmail.com
Thu Jan 17 01:11:57 EST 2008


On Jan 17, 2008 1:54 PM, Mel <mwilson at the-wire.com> 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.
>

Hi,

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