MCPcopy Index your code
hub / github.com/RustPython/RustPython / __sub__

Method __sub__

extra_tests/snippets/builtin_complex.py:152–153  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

150 return "Com" + str((self.real, self.imag))
151
152 def __sub__(self, other):
153 return Complex(self.real - other, self.imag)
154
155 def __rsub__(self, other):
156 return Complex(other - self.real, -self.imag)

Callers 3

builtin_float.pyFile · 0.45
builtin_set.pyFile · 0.45
builtin_int.pyFile · 0.45

Calls 1

ComplexClass · 0.70

Tested by

no test coverage detected