MCPcopy Create free account
hub / github.com/ActiveState/code / Foo

Class Foo

recipes/Python/113645_Classmethod/recipe-113645.py:7–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5 return lambda self, *args, **dict: method(self.__class__, *args, **dict)
6
7class Foo:
8 def bar(klass):
9 print 'In', klass, 'bar()'
10 bar = classmethod(bar)
11
12Foo().bar()
13

Callers 1

recipe-113645.pyFile · 0.70

Calls 1

classmethodFunction · 0.70

Tested by

no test coverage detected