On Sun, Nov 27, 2011 at 8:20 AM, candide <candide@free.invalid> wrote: > is() function makes comparaison of (abstract representation of) adresses of > objects in memory. Comparing addresses of objects is a low level feature > performed by low level langages such as C but seldom needed in high level > languages like Python, isn'it ?
You also want 'is' when you're testing for a singleton used as a default value: DEFAULT = object() def foo(arg1,arg2,arg3=DEFAULT): if arg3 is DEFAULT: print("You gave me two args") ChrisA -- http://mail.python.org/mailman/listinfo/python-list