[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

I'm wrong or Will we fix the ducks limp?

Paul Rudin <paul.nospam at>:

> Marko Rauhamaa <marko at> writes:
>> The spec (<URL:>)
>> uses the terms *identity* and *reference*, which are one-to-one.
> identity isn't the same thing as a name, identity is an inherent
> property of an object - many names may refer to the same object.

    x is y    if and only if    id(x) == id(y)

However, sorry for muddling the discussion by bringing in the identity.
I'll leave it out for now.

>> So your "names" are *variables*.
> Informally yes, but "variable" has no meaning in the language reference.

Really? How do you interpret these, then?

   Although the definition of assignment implies that overlaps between
   the left-hand side and the right-hand side are ?simultaneous? (for
   example a, b = b, a swaps two variables), overlaps within the
   collection of assigned-to variables occur left-to-right, sometimes
   resulting in confusion.


   Assignments to __debug__ are illegal. The value for the built-in
   variable is determined when the interpreter starts.


   The public names defined by a module are determined by checking the
   module?s namespace for a variable named __all__


   It would be impossible to assign to a global variable without global,
   although free variables may refer to globals without being declared


>> Unfortunately, virtually every word is overloaded and full of
>> preconceived notions. Hence: "pegs", "leashes", "puppies".
>> The main thing is to keep those three concepts apart from each other.
>> Two notions will not suffice.
> Well - adding more things is confusing in IMO - we have a language
> reference, let's just use the terms in the language reference.

I have quoted "the language reference" quite a bit. Your turn.

You would be correct that there is something of an faux elitism going
around that is influencing the language spec as well to a degree. It
appears some people consider "variables," "assignments," "pointers" etc
to be too riff-raff. So people want to say Python is unlike C and has
"names," "bindings," "references" etc.

There's no shame in stating directly that Python has variables just like
C even though Python's variables are not first-class. There's no
difference between binding and assignment. And a reference is a synonym
to a pointer.

Python still has good stuff C doesn't, or even Java.