[Python] copy and id() function

Marco Beri marcoberi a gmail.com
Mar 13 Ott 2009 12:44:49 CEST


On Tue, Oct 13, 2009 at 11:30 AM, Andrea Gasparini <gaspa a yattaweb.it>wrote:

> More in general, we don't understand the behavior of the id() function.
> > Doesn't return the object identity (object adress memory)??
>
> Si', ritorna esattamente quello.
>
> > Why the object identity of the three variables in the following example
> > is the same?? Does the id() function behave like the C/C++
> > adress-operator &??
>

Ok ma l'importante è che sia chiaro che non esiste il corrispondente
dell'operatore * di C :-)

Il bello di Python è che ti puoi dimenticare di puntatori, di allocare (e
poi rilasciare) la memoria, ecc.

Ciao.
Marco.

-- 
http://thinkcode.tv - Prossimamente su questi schermi
http://beri.it - Blog di una testina di vitello
http://stacktrace.it - Aperiodico di resistenza informatica
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: http://lists.python.it/pipermail/python/attachments/20091013/3d15d591/attachment.htm 


Maggiori informazioni sulla lista Python