fork(5) download
  1. class A(object):
  2. def __init__(self):
  3. self.x = 1
  4.  
  5. class B(object):
  6. def __init__(self):
  7. self.y = 2
  8.  
  9. class C(A, B):
  10. pass
  11.  
  12. print(C().y)
Runtime error #stdin #stdout #stderr 0.12s 23536KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 12, in <module>
AttributeError: 'C' object has no attribute 'y'