fork download
  1. class Base(object):
  2. def __new__(cls):
  3. return super(Base, cls).__new__(C)
  4.  
  5. class C(Base):
  6. def __str__(self):
  7. return "C()"
  8.  
  9. print(Base())
  10.  
Success #stdin #stdout 0.02s 5864KB
stdin
Standard input is empty
stdout
C()