Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A:
- # a = A(x=2); a.f(10)
- def __init__(self, x: int):
- self.x = x
- def __call__(self, y: int):
- print("%s called with y==%d" % (self, y))
- return self.x + y
- def f(self, z: int):
- return self(y=z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement