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!
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to