April 17, 2015
9:44 p.m.
On 04/18, Ionel Cristian Mărieș wrote:
__add__ as a property/descriptor seems to work fine, eg:
class C: ... @property ... def __add__(self): ... return lambda other: [self, other] ...
C() + C() [<__main__.C object at 0x0000000003652AC8>, <__main__.C object at 0x0000000003652CC0>]
Am I missing something?
What happens when your __add__ raises an AttributeError? -- ~Ethan~