kuroko/test/testQualname.krk

21 lines
398 B
Python
Raw Normal View History

2021-02-25 04:03:52 +03:00
class TopLevel():
pass
class TopOfNested():
def func(self):
class Inner():
pass
return Inner
def topLevelFunc():
class OtherInner():
pass
return OtherInner
print(TopLevel.__qualname__)
print(TopOfNested.__qualname__)
print(TopOfNested().func().__qualname__)
print(TopOfNested().func())
print(topLevelFunc().__qualname__)
print(topLevelFunc())