micropython/tests/basics/subclass_classmethod.py

13 lines
150 B
Python
Raw Normal View History

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