while true: !!!

Mikael Olofsson mikael at isy.liu.se
Tue Dec 19 02:42:53 EST 2000


On 18-Dec-00 deadmeat wrote:
 >  however I don't know if variables passed to Python functions can be
 >  altered?

They can if they are mutable:

>>> def test(x):
...   x[1]=4
... 
>>> a=[1,2,3]
>>> test(a)
>>> a
[1, 4, 3]



/Mikael

-----------------------------------------------------------------------
E-Mail:  Mikael Olofsson <mikael at isy.liu.se>
WWW:     http://www.dtr.isy.liu.se/dtr/staff/mikael               
Phone:   +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date:    19-Dec-00
Time:    08:41:33

         /"\
         \ /     ASCII Ribbon Campaign
          X      Against HTML Mail
         / \

This message was sent by XF-Mail.
-----------------------------------------------------------------------



More information about the Python-list mailing list