<br><br><div class="gmail_quote">2011/3/19 Yaşar Arabacı <span dir="ltr"><<a href="mailto:yasar11732@gmail.com">yasar11732@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
>>>a=5<br>
>>>b=5<br>
>>>a == b<br>
True<br>
>>>a is b<br>
True<br>
<br>
My question is, why "a is b" is true. What I expected it to be is that, a and b are different things with same value.<br>
<br>
_______________________________________________<br>
Tutor maillist - <a href="mailto:Tutor@python.org" target="_blank">Tutor@python.org</a><br>
To unsubscribe or change subscription options:<br>
<a href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">http://mail.python.org/mailman/listinfo/tutor</a><br>
</blockquote></div><br>Oops. I misread your post. I (why I don't know) thought I saw a = 5, b = 4.<br><br>a and b are names. Python has an integer of 5 from a = 5, so it just refers to that same object with b.<br>
<br><br clear="all"><br>-- <br>Joel Goldstick<br><br>