fork(3) download
  1. class C:
  2. def f(): pass
  3. class D:
  4. def g(): pass
  5.  
  6. print(C.__qualname__)
  7. print(C.f.__qualname__)
  8. print(C.D.__qualname__)
  9. print(C.D.g.__qualname__)
  10. print(C.__name__)
  11. print(C.f.__name__)
  12. print(C.D.__name__)
  13. print(C.D.g.__name__)
  14.  
  15. def f():
  16. def g(): pass
  17. return g
  18.  
  19. print(f.__qualname__)
  20. print(f().__qualname__)
  21. print(f.__name__)
  22. print(f().__name__)
  23.  
  24. #https://pt.stackoverflow.com/q/339502/101
Success #stdin #stdout 0.01s 27640KB
stdin
Standard input is empty
stdout
C
C.f
C.D
C.D.g
C
f
D
g
f
f.<locals>.g
f
g