Skip to content

Commit

Permalink
Vector2.__radd__: Avoid using dunders directly
Browse files Browse the repository at this point in the history
  • Loading branch information
nbraud committed May 22, 2019
1 parent 6e44959 commit 1731117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ppb_vector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def __add__(self, other: VectorLike) -> 'Vector':
return Vector(self.x + other_x, self.y + other_y)

def __radd__(self, other: VectorLike) -> 'Vector':
return self.__add__(other)
return self + other

def __sub__(self, other: VectorLike) -> 'Vector':
"""Subtract one vector from another.
Expand Down

0 comments on commit 1731117

Please sign in to comment.