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

Class madcomplex

Lib/test/test_descr.py:2945–2947  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2943 self.assertIs((+a).__class__, float)
2944
2945 class madcomplex(complex):
2946 def __repr__(self):
2947 return "%.17gj%+.17g" % (self.imag, self.real)
2948 a = madcomplex(-3, 4)
2949 self.assertEqual(repr(a), "4j-3")
2950 base = complex(-3, 4)

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…