Variables

Terry Reedy tjreedy at udel.edu
Sun Apr 24 00:20:40 EDT 2005


"Richard Blackwood" <richardblackwood at cloudthunder.com> wrote in message 
news:426B083A.70104 at cloudthunder.com...
> Indeed, this language is math.

In mathematics, the word 'variable' is generally an undefined meta-term 
that is *notorious* for having multiple possible meanings and shades of 
meaning.  One mathematician/linguist once claimed to have discerned 
somewhere around 15 different meanings and shades thereof.  The context 
usually makes the particular meaning clear enough, at least to other 
mathematicians.  But the ambiguity sometimes disconcerting to students.

> My friend says that foo is a constant and necessarily not a variable.

'constant' is one of the possible meanings of 'variable'.  As is "Given 
that (3*x -2)/5 = 1, what is the value of the variable x".  Sometimes, 
whether a 'variable' actually 'varies' or not, is a matter of viewpoint. 
We may think of 'varying' as something that happens in time, whereas most 
math is timeless.

In any case, 'foo=5' can be followed, in Python, by 'foo="hopscotch" '.  So 
names (as opposed to objects) do not even have a type.  Also, in Python, 
'variable' is not a part of the official language description in the way it 
is for some other programming languages.

Terry J. Reedy








More information about the Python-list mailing list