What other languages use the same data model as Python?

Ben Finney ben+python at benfinney.id.au
Sat May 7 16:09:19 EDT 2011


Gregory Ewing <greg.ewing at canterbury.ac.nz> writes:

> > On Thu, 05 May 2011 07:43:59 +1000, Ben Finney wrote:
> >
> >>‘x’ is a name. Names are bound to values. Talk of “variable” only
> >>confuses the issue because of the baggage carried with that term.
>
> But to use 'name' as a complete replacement for 'variable',

I don't propose doing that.

> In Python I use 'variable' to mean more or less 'something that can be
> assigned to', which accords with the way it's used in relation to many
> other languages, and doesn't suggest any restriction to things named
> by a single identifier.

No, I think not. The term “variable” usually comes with a strong
expectation that every variable has exactly one name. Your more broad
usage would need to be carefully explained to newbies anyway, so I don't
see a good reason to use the term “variable” for that either.

> Seems to me that anyone taking that connotation from it has not yet
> been sufficiently educated about the Python data model itself.

Yes, of course. But why not meet such newcomers partway, by not
confusing the issue with a term which needs such delicate treatment?

> >>Saying “variable” and “has the value”
>
> But I don't say "has a value", I say "refers to".

Good for you. Most don't.

-- 
 \     Q: “I've heard that Linux causes cancer...” Torvalds: “That's a |
  `\         filthy lie. Besides, it was only in rats and has not been |
_o__)                           reproduced in humans.” —Linus Torvalds |
Ben Finney



More information about the Python-list mailing list