[Cython] Overflow semantics in pure Python mode
Stefan Behnel
stefan_ml at behnel.de
Fri Nov 7 07:34:43 CET 2008
Hi,
Willem Broekema wrote:
> On Thu, Nov 6, 2008 at 5:17 PM, Robert Bradshaw
> <robertwb at math.washington.edu> wrote:
>> Um, No. If you declare a variable to be int then it *will* overflow
>> when compiled but not (currently) when interpreted.
>
> The question was not intended as "will overflow happen?" but "may a
> developer make use of it?"
That's how I read it. It's exactly like writing
cdef int i
and relying on an overflow at 32bits, even on a 16 bit or 64 bit platform.
I really think this is a non-problem. Few people would write pure Python code
for Cython without the intention to run it in Python, i.e. with Python semantics.
Stefan
More information about the Cython-dev
mailing list