How to Teach Python "Variables"
J. Clifford Dyer
jcd at sdf.lonestar.org
Wed Nov 28 18:48:54 CET 2007
On Wed, Nov 28, 2007 at 11:23:42AM -0600, Chris Mellon wrote regarding Re: How to Teach Python "Variables":
> On Nov 28, 2007 10:57 AM, hdante <hdante at gmail.com> wrote:
> > On Nov 28, 2:12 pm, "Chris Mellon" <arka... at gmail.com> wrote:
> > >
> > > Right. Python variables are pointers, except for all the ways that
> > > they are different. By the same criteria, they are also puppies. Give
> > > it a rest.
> > I'm sorry if your notion of pointer is incorrect. A pointer (or, more
> > formally, a reference) is an object that points to some value. A
> > python variable isn't different than that in any way.
> A python name isn't an object. The difference between names and
> objects is at the core of this entire conversation. In fact, you are
> exactly the sort of person this discussion was targeted at, because
> you don't understand the difference.
> You can play semantic games if you want and just declare that
> everything is the same at some fundamental level. It's a little like
> taking your ball and going home, because insisting on names that don't
> indicate the differences between things is useless at best and harmful
> at worst.
> Whether you like it or not, the term "pointer" has a specific common
> meanings. They do not mean "any means by which you may reference a
> value". "variable" is certainly less clear and is used much more
> loosely, but in the specific context of comparison to C, python
> name/object bindings are not the same as C variables.
> Pointers are values. They also point at other values, and those values
> may be other pointers, ad infinitum. Understanding this is core to
> understanding and using pointers.
> Python names are *not* values, and all they do is tag a specific
> object in a specific namespace. You can't have a name that refers to
> another name, names can only refer to objects. Understanding this is
> core to understanding and using the Python object model, *especially*
> if some nitwit has been telling you that they're the same as pointers.
OK, now we're down to mock sympathy, insulting analogies and name-calling. Can we just let this thread die. It was an interesting discussion for a while, but it's moved into that ugly putrefaction stage now. Nothing new is being said, and the old stuff is being said more rudely than before.
This thread is bleedin' demised.
More information about the Python-list