Stefan Krah <stefan-use...@bytereef.org> added the comment: The proposal makes sense at first glance, but I agree with Mark that it is not clear what should be done. For example, all arrays in Python silently convert to inf:
>>> from numpy import array >>> x = array([1,2,3], 'f') >>> x array([ 1., 2., 3.], dtype=float32) >>> x[0] = 10**100 >>> x array([ inf, 2., 3.], dtype=float32) Same for array.array and memoryview. I would not be surprised if users rely on this behavior. Anyway, silently converting to infinity is exactly what I'd expect (also for double BTW). Regarding undefined behavior: I only know compilers that convert to infinity without signaling overflow. The tests for the new memoryview implementation should include this case (I think!), and I ran the tests with all compilers that I've access to. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14722> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com