Skip to content

Instantly share code, notes, and snippets.

@rch
Created July 21, 2019 21:49
Show Gist options
  • Save rch/e08c8c071a02774de7eeafd2b3818dde to your computer and use it in GitHub Desktop.
Save rch/e08c8c071a02774de7eeafd2b3818dde to your computer and use it in GitHub Desktop.
references
class A:
def __init__(self, n):
self.v = n
def add(self, n):
self.v += n
x = A(3)
y = x
print(y.v)
y.add(2)
print(x.v)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment