Another of those "is" issues.

Christian Heimes lists at cheimes.de
Fri Mar 20 19:36:29 EDT 2009


Terry Reedy wrote:

> Compare that to MyClass.myMethod is MyClass.myMethod, which is True at
> least in 3.0.  

It's true because Python 3.0 has no unbound methods. MyClass.myMethod
returns the function object. It's possible to get the same behavior in 2.x:

  MyClass.myMethod.im_func is MyClass.myMethod.im_func

Christian




More information about the Python-list mailing list