How can this be?

Josiah Carlson jcarlson at nospam.uci.edu
Thu Feb 5 21:33:06 EST 2004


> Without my posting the function def (which is
> very lengthy), can anyone possibly give me a 
> clue about what might be a likely cause of this
> behavior?  (It *is* irregular, isn't it?  ?) 

Your function is changing it:

 >>> def fun(input):
...     input[0] = 1
...
 >>> L = [0]
 >>> print L
[0]
 >>> fun(L)
 >>> print L
[1]
 >>>


  - Josiah



More information about the Python-list mailing list