scared about refrences...
fredrik at pythonware.com
Wed Nov 1 21:34:52 CET 2006
>> Plain wrong. There's no "primitives" (ie : primitive data types) in
>> Python, only objects. And they all get passed the same way.
> def fn(x):
> x = x + 1
> print x
> a = 2
> Wouldn't you say that this is being passed by value rather than by
Python uses neither "call by value" nor "call by reference", but that's
irrelevant: the result you're seeing has nothing to do with the calling
model, but with how assignment works. Gabriel already posted this link;
I suggest you read it again:
More information about the Python-list