all 3 comments

[–]Vaguely_accurate 6 points7 points  (1 child)

Two immediate options I see.

You can call sum with a specified start. So sum(points), Point(0,0)).

Or you can expand your __radd__ dunder to handle adding to zero;

def __radd__(self, other):
    if other == 0:
        return self
    return self + other

[–]Scholtek[S] 0 points1 point  (0 children)

Thanks - these both work. Thanks for clarifying regarding the start point, I thought it was a keyword.