Re: [Tutor] Identity operator (basic types)

2007-02-10 Thread Kent Johnson
Cecilia Alm wrote: > Why does the identity operator return "True" in the below cases, that is > when assigning the same value to basic variable types (float, integer, > string, bool..)? Are these rcopied by reference (shallow)? If so why? Assignment in Python is always by reference. Variables i

Re: [Tutor] Identity operator (basic types)

2007-02-09 Thread Daniel Yoo
>> Why does the identity operator return "True" in the below cases, >> that is when assigning the same value to basic variable types >> (float, integer, string, bool..)? Are these rcopied by reference >> (shallow)? If so why? >> > i = 10 > j = 10 > i is j >> True The above you have

Re: [Tutor] Identity operator (basic types)

2007-02-09 Thread John Fouhy
On 10/02/07, Cecilia Alm <[EMAIL PROTECTED]> wrote: > Why does the identity operator return "True" in the below cases, that is > when assigning the same value to basic variable types (float, integer, > string, bool..)? Are these rcopied by reference (shallow)? If so why? > > >>> i = 10 > >>> j =

Re: [Tutor] Identity operator (basic types)

2007-02-09 Thread Christopher Lucas
On Feb 9, 2007, at 10:34 PM, Cecilia Alm wrote: > Why does the identity operator return "True" in the below cases, > that is when assigning the same value to basic variable types > (float, integer, string, bool..)? Are these rcopied by reference > (shallow)? If so why? > > >>> i = 10 > >>>

[Tutor] Identity operator (basic types)

2007-02-09 Thread Cecilia Alm
Why does the identity operator return "True" in the below cases, that is when assigning the same value to basic variable types (float, integer, string, bool..)? Are these rcopied by reference (shallow)? If so why? i = 10 j = 10 i is j True a = 10 b = a a is b True Thanks!