The “does Python have variables?” debate

Marko Rauhamaa marko at pacujo.net
Thu May 8 10:03:48 EDT 2014


Ethan Furman <ethan at stoneleaf.us>:

> On 05/08/2014 05:41 AM, Roy Smith wrote:
>> For those people, talking about variables as a container to hold a
>> value is the right level of abstraction.
>
> [...]
>
> Teaching someone that Python variables are containers is a massive fail.

But that's what they are.

We are really debating on the suitability of a metaphor. The palm of my
hand is a "container" for a horse. You can ask, Which horse are you
holding? when it's only the reins I'm holding.

Or maybe we can think of Python's data model as a city with structures
of different sizes and shapes. A variable is a container that holds the
address of a structure...


Marko



More information about the Python-list mailing list