How can this be?

r.e.s. r.s at ZZmindspring.com
Thu Feb 5 19:29:52 EST 2004


My problem is this ...

Module A contains the definition of a function f.
Module B contains:

    from A import *
    L = [0]
    print L
    x = f(L, 'a data string')
    print L

When Module B is imported/reloaded (in pythonwin), 
the result printed in the interactive window is

    [0]
    [1]

How can the list L have gotten changed??

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?  ?) 

Thanks for any help.

--r.e.s.





More information about the Python-list mailing list