Lines Matching refs:__complex__
177 # Test automatic calling of __complex__ and __float__ by cmath
187 # non-complex return values from __complex__ give an error
194 # usual case: new-style class implementing __complex__
198 def __complex__(self):
201 # old-style class implementing __complex__
205 def __complex__(self):
208 # classes for which __complex__ raises an exception
212 def __complex__(self):
215 def __complex__(self):
218 # some classes not providing __float__ or __complex__
229 # other possible combinations of __float__ and __complex__
234 def __complex__(self):
239 def __complex__(self):
252 # other combinations of __float__ and __complex__
259 # either __complex__ or __float__, even if they provide
266 # non-complex return value from __complex__ -> TypeError
270 # exceptions in __complex__ should be propagated correctly