|
|
|
I have found that many people have misconceptions about this topic. But it's easy to understand with the right model. My "Code Like a Pythonista: Idiomatic Python" tutorial (given at PyCon and OSCON in 2007) illustrates the model well (IMHO):
http://python.net/~goodger/proje...-have-
variables
David Goodger |
Homepage |
08/11/04 - 3:36 pm | #
|
|
That's a good description David. It is fairly similar to the one I have at the start of the Python tutorial in IronPython in Action.
It is certainly a difference that every Python newbie has to get over (usually accompanied by an 'aha' moment when everything becomes clear).
Because integers are value types in languages like Java and C# they behave the same as Python for example with numbers that both you and I use.
This is why I mention that value types are *analogous* to immutable types in Python - but not identical.
Michael Foord |
Homepage |
08/11/04 - 4:14 pm | #
|
|
|
Commenting by HaloScan
|