[M.-A. Lemburg] > Isn't that caveat in the complex implementation ? Converting a > complex with 0 img part would not cause any loss of information > (apart from the usual integer truncations ;-) Hmm. Have you ever met a coercion you didn't like <0.9 wink>? float(complex) also raises an exception unconditionally, and I think for good reasons -- what someone *intends* by trying to convert a complex number to a float or an int is a mystery. The exceptions raised suggest one plausible intent and how to get at it clearly: >>> float(1+0j) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: can't convert complex to float; use e.g. abs(z) >>>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4