Problem with assigning variables of type List

Donn Cave donn at
Thu Aug 22 07:18:36 CEST 2002

Quoth Greg Ewing <see_reply_address at something.invalid>:
| Fredrik Lundh wrote:
| > perhaps if you're using your own, very precise and extremely narrow
| > definitions of words like "value", "argument", "change", "procedure" etc.
| They're not *his* definitions, they're *the* definitions
| used in defining the terms call-by-value and call-by-reference.
| Some of them are unfortunately different from the conventional
| use of the same words in relation to Python. This means that,
| if you want to meaningfully apply the terms call-by-value and
| call-by-reference to Python, you have to be prepared to
| translate.

To apply the terms call-by-value and call-by-reference to Python,
we need to use different definitions of "value", "argument", "change"?

So, might you agree that the exercise is unlikely to help someone
understand Python better, in the common case?

| It would also help if we became less afraid of using
| the term "variable" in relation to Python. There's no
| trouble defining it in a way that makes perfectly good
| sense in Python and is also compatible with the terminology
| used in cm-land. But for some reason some people want to
| insist that "there are no variables in Python, only
| names" or "only bindings" or some other nonsense.

Right, because of C.  I don't think cm-land has a thing to
do with it, the point is that if you can convince a C programmer
that Python has bindings and objects where C had variables,
his or her Python programs are more likely to work correctly.
I don't think it even matters so much whether that's an
absolutely reliable account of it - they'll proceed to learn
what it means in terms of what Python actually does.  You
could probably just as well say "Python rivets The Larch",
as long as it's uttered with conviction and accompanied by
an example or two.  Just don't say "v*riable".

	Donn Cave, donn at

More information about the Python-list mailing list