Pointers

Jason Stokes jstok at bluedog.apana.org.au
Wed Mar 15 22:34:24 EST 2000


Curtis Jensen wrote in message <38D00DCE.9740380F at be-research.ucsd.edu>...
>I haven't found anything about pointers in python.  Is there a pointer
>type?  If so, what is the syntax?


Since you ask this I assume you come from a C background.

All Python variables are references.  References are similar to C pointers
(indeed, internally they are implemented the same way) except references
don't support pointer arithmetic.

So you don't need to declare a variable of type "pointer to string" (or what
have you) because all Python variables could be considered to have the type
"reference to object."







More information about the Python-list mailing list