On Fri, 05 Apr 2013 06:49:14 -0700, Candide Dandide wrote:
> So, could someone please explain what exactly the is operator returns ?
> The official doc says :
>
> The ‘is‘ operator compares the identity of two objects; the id()
> function returns an integer representing its identity (currently
>
On 6 April 2013 03:40, candide wrote:
> Le vendredi 5 avril 2013 16:53:55 UTC+2, Arnaud Delobelle a écrit :
>
>
> >
> > You've fallen victim to the fact that CPython is very quick to collect
> >
> > garbage.
>
>
> OK, I get it but it's a fairly unexpected behavior.
> Thanks for the demonstrative
Le vendredi 5 avril 2013 16:53:55 UTC+2, Arnaud Delobelle a écrit :
>
> You've fallen victim to the fact that CPython is very quick to collect
>
> garbage.
OK, I get it but it's a fairly unexpected behavior.
Thanks for the demonstrative snippet of code and the instructive answer.
--
http
On 5 April 2013 14:49, Candide Dandide wrote:
> Until now, I was quite sure that the is operator acts the same as the id
> builtin function, or, to be more formal, that o1 is o2 to be exactly
> equivalent to id(o1) == id(o2). This equivalence is reported in many books,
> for instance Martelli's