subclass_classmethod.py 150 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
# Calling an inherited classmethod
class Base:

    @classmethod
    def foo(cls):
        print(cls.__name__)

class Sub(Base):
    pass


Sub.foo()