micropython/tests/basics/subclass_classmethod.py
Paul Sokolovsky 195de3247b objtype: Fix passing of class param to inherited classmethods.
This is getting more and more tangled, but that's old news.
2014-06-08 22:28:44 +03:00

13 lines
150 B
Python

# Calling an inherited classmethod
class Base:
@classmethod
def foo(cls):
print(cls.__name__)
class Sub(Base):
pass
Sub.foo()