reference or pointer to some object?

Alex Martelli aleaxit at
Thu Jan 13 13:17:18 EST 2005

Jeff Shannon <jeff at> wrote:

> Because Python uses a fundamentally different concept for variable 
> names than C/C++/Java (and most other static languages).  In those 
> languages, variables can be passed by value or by reference; neither 
> term really applies in Python.  (Or, if you prefer, Python always 

Java's model is quite similar to Python's, except that Java makes some
exception for very low-level types such as int or float.  But there is
no "passing by reference" in Java, anyway: the semantics of assignment
and argument passing (same thing) are VERY close in Java and Python.

I hope this is enough to show that static or dynamic is quite a
different issue -- Java's more or less statically typed, Python
dynamically, but their model of variables is VERY similar anyway.


More information about the Python-list mailing list