On 3/3/2014 4:42 AM, ast wrote:

Consider following code:

A=7
B=7
A is B

The 'is' operator has three uses, two intended and one not. In production code, 'is' tests that an object *is* a particular singular object, such as None or a sentinel instance of class object. In test code, 'is' can also be used to test details of a particular implementation, such as pre-allocation of small ints. New python programmers also use it to confuse themselves.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to