Mark Dickinson <dicki...@gmail.com> added the comment: More fun arising from the current complex comparison implementation: usually you can put a complex number and an integer into the same set:
>>> {1, 2j} # (Python 3 code) {1, 2j} >>> s = {10**1000, 2j} # huge integers no problem But if you happen to pick the wrong combination.... >>> x, n = 9.3 + 0j, 10**300*(2**64-1)+hash(9.3) >>> x (9.3+0j) >>> n 18446744073709551615000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002107349606 >>> {x, n} Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: long int too large to convert to float ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8748> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com