fork download
  1. class Meta(type):
  2. def mro(self):
  3. return (self, object)
  4.  
  5. class Foo(metaclass=Meta):
  6. def __getattribute__(self):
  7. return lambda *args, **kwargs: print(args, kwargs)
  8.  
  9. Foo() + 3
Runtime error #stdin #stdout #stderr 0.22s 23548KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 9, in <module>
TypeError: unsupported operand type(s) for +: 'Foo' and 'int'