[Tutor] [tutor] Pointers in python ??
Alan Gauld
alan.gauld at btinternet.com
Sun Jan 20 09:41:44 CET 2008
"Varsha Purohit" <varsha.purohit at gmail.com> wrote
> Does python has concept of pointers like c/cpp ?? If yes
> how.. can
> anyone give me a small example to how we can use pointers in python.
No, not really.
It does have the concept of C++ references however and in fact
thats how Pyhon variables work. They are all references. But
there is no real concept of a poibnter to a specific memory
location, and especially one that can be manipulated
arithmetically.
OTOH there is in practice little need for such a low level
approach in Python. What did you have in mind thast you
thought might need a pointer?
--
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list