diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-08 22:28:44 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-06-08 22:28:44 +0300 |
commit | 195de3247b0a02df9098b45551b0d5e8d9b06a33 (patch) | |
tree | 7f058b000b57c7873973f924b955ff7e3db7ad96 /tests/basics/subclass_classmethod.py | |
parent | 639863d36ecd202ecfba7e9314145536ece7207b (diff) | |
download | micropython-195de3247b0a02df9098b45551b0d5e8d9b06a33.tar.gz micropython-195de3247b0a02df9098b45551b0d5e8d9b06a33.zip |
objtype: Fix passing of class param to inherited classmethods.
This is getting more and more tangled, but that's old news.
Diffstat (limited to 'tests/basics/subclass_classmethod.py')
-rw-r--r-- | tests/basics/subclass_classmethod.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/basics/subclass_classmethod.py b/tests/basics/subclass_classmethod.py new file mode 100644 index 0000000000..01deffba47 --- /dev/null +++ b/tests/basics/subclass_classmethod.py @@ -0,0 +1,12 @@ +# Calling an inherited classmethod +class Base: + + @classmethod + def foo(cls): + print(cls.__name__) + +class Sub(Base): + pass + + +Sub.foo() |