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

Class complex2

Lib/test/test_complex.py:621–625  ·  view source on GitHub ↗

Make sure that __complex__() calls fail if anything other than a complex is returned

Source from the content-addressed store, hash-verified

619 return self
620
621 class complex2(complex):
622 """Make sure that __complex__() calls fail if anything other than a
623 complex is returned"""
624 def __complex__(self):
625 return None
626
627 check(complex(complex0(1j)), 0.0, 42.0)
628 with self.assertWarns(DeprecationWarning):

Callers 1

test_constructorMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_constructorMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…