Tuvas tuvas21 at
Thu Dec 15 03:17:57 CET 2005

I don't know if I can help with this much, I'm still somewhat new to
python, but it is my understanding that "simple" variable, ei, strings,
ints, etc, although they don't have such names, behave like variables,
ei, if you pass them to a function, the function will copy them into a
new spot. However, if you use lists, then it only passes a pointer, or
tuples as well. Ei, I just ran this through the python IDE.

>>> x="Test"
>>> def modstring(var):
>>> modstring(x)
>>> print x

This seems to indicate that the variable is copied, as the value didn't
change. Weither or not Python keeps the variables as pointers
internally, it doesn't really matter. Actually, all languages do such
things, except assembly.

I just ran the test on lists and tuples, it was the same results,
nothing moved.

Other than this, I basically see a fight on terminology, and that's

More information about the Python-list mailing list