module confusion

Ben Finney bignose+hates-spam at benfinney.id.au
Thu Oct 4 05:41:25 CEST 2007


Steve Holden <steve at holdenweb.com> writes:

> You and I know that the semantics of Python names are precisely
> those of (to use an Algol 68 term, unless I am mistaken)
> automatically dereferenced pointers to objects of arbitrary type.

Yes. That's exactly why it's wrong to refer to them as pointers. They
don't behave like the pointers in other languages, which are *not*
"automatically-dereferenced", nor "to objects of arbitrary type".

It's misleading to talk about a Python name as a "pointer" without
those qualifiers, because they're *not* implicit in programmers'
understanding of that term.

If you want to continually refer to them as
"automatically-dereferenced pointers to objects of arbitrary type", by
all means go ahead. That at least *does* fit the semantics. But the
simple term "pointer" does *not* describe them in the absence of those
necessary and non-default qualifiers, and is misleading.

-- 
 \     "I wish there was a knob on the TV to turn up the intelligence. |
  `\      There's a knob called 'brightness' but it doesn't work."  -- |
_o__)                                              Eugene P. Gallagher |
Ben Finney



More information about the Python-list mailing list