fork download
  1. class Foo:
  2. def meth(self):
  3. nonlocal __class__
  4. __class__ = 3
  5. super()
  6.  
  7. Foo().meth()
Runtime error #stdin #stdout #stderr 0.01s 27712KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 7, in <module>
  File "./prog.py", line 5, in meth
RuntimeError: super(): __class__ is not a type (int)