pointers

sdd daniels at dsl-only.net
Sun Dec 28 13:29:26 EST 2003


km wrote:

> Hi all,
> may i know  if  there is any plans of  introducing the concept of pointers into python language as in C ?  (atleast in future versions ?)
> regards,
> thanks KM

Nope.  I believe the official line is "YAGNI" (You Aint Gonna Need It).
Pointers can be fun to create interesting code, bugs and hacks, but
there is little to use them for.  If you are wanting to use a familiar
structure, it won't happen here.  If you think you have a _real_world_
case for it here, we can often explain why you don't really need it.
The _real_world_ bit means: find an example we can have intuitions
about, not simply foos, frobs, and mumbles.

By the way, you might think of python names as pointers to objects,
or integers as list (or string or tuple or array)-based pointers where
the list the pointer comes from is kept specific.  If you want, you
could even create a class named Pointer to hide the list the pointer
is based on.  We'd generally advise against this, but...

-Scott David Daniels
Scott.Daniels at Acm.Org





More information about the Python-list mailing list