Dag Sverre Seljebotn skrev:
> f(x)
>
> doesn't ever change the value of x! 
Only if x is immutable.

> While in C++, f could take a reference. 
In Python, x is always a reference. But there are immutable types. So 
while a Python int is immutable, a C or C++ int is mutable.

If you want to enforce immutability even in C++, then make local copies 
before making the function call.


Sturla


_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to