Test usage of __complex__() with a __new__() method
| 612 | return 42j |
| 613 | |
| 614 | class complex1(complex): |
| 615 | """Test usage of __complex__() with a __new__() method""" |
| 616 | def __new__(self, value=0j): |
| 617 | return complex.__new__(self, 2*value) |
| 618 | def __complex__(self): |
| 619 | return self |
| 620 | |
| 621 | class complex2(complex): |
| 622 | """Make sure that __complex__() calls fail if anything other than a |
no outgoing calls
searching dependent graphs…