fork download
  1. class A:
  2. def __init__(self, x):
  3. self.__x = x
  4. def m(self, other):
  5. print(other.__x)
  6.  
  7. foo = A(1)
  8. bar = A(2)
  9. foo.m(bar)
Success #stdin #stdout 0.01s 27656KB
stdin
Standard input is empty
stdout
2