| 3 | # + operator overloading. |
| 4 | |
| 5 | class complex: |
| 6 | def __init__(self, a, b): |
| 7 | self.a = a |
| 8 | self.b = b |
| 9 | |
| 10 | # adding two objects |
| 11 | def __add__(self, other): |
| 12 | return self.a + other.a, self.b + other.b |
| 13 | |
| 14 | Ob1 = complex(1, 2) |
| 15 | Ob2 = complex(2, 3) |
no outgoing calls
no test coverage detected