In (for example) Python 2.6: >>> float('1e500') inf >>> complex('1e500') Traceback (most recent call last): File "", line 1, in ValueError: float() out of range: 1e500 I'd say that one of these is a bug, but I'm not sure which one. Ideally, float('1e500') would raise OverflowError (not ValueError). But it's quite likely that there are people who depend on the current behaviour, and the current behaviour also agrees with what happens for float literals: >>> 1e500 inf For 2.7 and 3.1, I propose fixing the complex constructor so that complex('1e500') produces (inf+0j). For 2.6 and 3.0, I propose leaving the current behaviour as it is.
complex('1e-500') bug fixed in r71891 (2.6) and r71892 (3.0). It's already gone in trunk and py3k. What's left is deciding whether the OverflowError that 2.7 and 3.1 currently produce should disappear in favour of producing infinities instead.