Test usage of __complex__() with a __new__() method
| 617 | return 42j |
| 618 | |
| 619 | class complex1(complex): |
| 620 | """Test usage of __complex__() with a __new__() method""" |
| 621 | def __new__(self, value=0j): |
| 622 | return complex.__new__(self, 2*value) |
| 623 | def __complex__(self): |
| 624 | return self |
| 625 | |
| 626 | class complex2(complex): |
| 627 | """Make sure that __complex__() calls fail if anything other than a |
no outgoing calls