MCPcopy Index your code
hub / github.com/python/cpython / __add__

Method __add__

Lib/turtle.py:249–250  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

247 def __new__(cls, x, y):
248 return tuple.__new__(cls, (x, y))
249 def __add__(self, other):
250 return Vec2D(self[0]+other[0], self[1]+other[1])
251 def __mul__(self, other):
252 if isinstance(other, Vec2D):
253 return self[0]*other[0]+self[1]*other[1]

Callers

nothing calls this directly

Calls 1

Vec2DClass · 0.70

Tested by

no test coverage detected