Surprise using the 'is' operator

codefire tony.bedford at gmail.com
Tue Sep 26 06:15:19 EDT 2006


Thanks for that Fredrik, that's clear. That's actually a pretty nice
feature as it's nicely optimised.

>>> a = 10
>>> c = 10
>>> a is c
True
>>> c = c +1
>>> a is c
False
>>> 

Cheers,
Tony




More information about the Python-list mailing list