Quick actions

cmd+k|ctrl+k

Navigation

Languages

pymi_operator_overload.py

Snippet info

Language

Python

Visibility

unlisted

Author

legacy-anonymous

Created

2021-08-25T13:32:34.917782Z

Updated

2021-08-25T13:32:34.917782Z

class MyInt():
    def __init__(self, n):
        self.n = n
    def __add__(self, k):
        return (self.n + k.n) * 2
two = MyInt(2)
three = MyInt(3)
print(two + three == 10)
INFO