O'Reilly logo
  • Chris Kang thinks this is interesting:

Because a bound method is already associated with a specific instance, you call the method as follows:

x.h()                      # prints: method h in class C

The key thing to notice here is that you don’t pass the method’s first argument, self, by the usual argument-passing syntax. Rather, a bound method of instance x implicitly binds the self parameter to object x. Thus, the body of the method can access th...


Cover of Python in a Nutshell, 3rd Edition


For v2, even though you're calling unbound (static) method on class C, you need to pass in an instance of Class C as the first argument to the method h().