Lines Matching defs:__complex__
123 # Test automatic calling of __complex__ and __float__ by cmath
133 # non-complex return values from __complex__ give an error
140 # usual case: new-style class implementing __complex__
144 def __complex__(self):
147 # old-style class implementing __complex__
151 def __complex__(self):
154 # classes for which __complex__ raises an exception
158 def __complex__(self):
161 def __complex__(self):
164 # some classes not providing __float__ or __complex__
178 # other possible combinations of __float__ and __complex__
183 def __complex__(self):
188 def __complex__(self):
201 # other combinations of __float__ and __complex__
207 # either __complex__ or __float__, even if they provide
215 # non-complex return value from __complex__ -> TypeError
219 # exceptions in __complex__ should be propagated correctly