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

Class complex0

Lib/test/test_complex.py:609–612  ·  view source on GitHub ↗

Test usage of __complex__() when inheriting from 'complex

Source from the content-addressed store, hash-verified

607 self.assertRaises(TypeError, complex, 1.5, MyInt())
608
609 class complex0(complex):
610 """Test usage of __complex__() when inheriting from 'complex'"""
611 def __complex__(self):
612 return 42j
613
614 class complex1(complex):
615 """Test usage of __complex__() with a __new__() method"""

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…