fork download
  1. class A:
  2. def __init__(self):
  3. self.v = 1
  4. self.__v = 2
  5.  
  6. class B(A):
  7. def f(self):
  8. print(self.v)
  9. print(self._A__v)
  10.  
  11. b = B()
  12. b.f()
Success #stdin #stdout 0.03s 9112KB
stdin
Standard input is empty
stdout
1
2