The Voidspace Techie Blog

Gravatar 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


Gravatar 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.


Name:

Email:

URL:

Comment:  ? 

 

Commenting by HaloScan