Sturla Molden wrote:
> Carl Witty wrote:
>   
>> One point I alluded to above, but maybe should emphasize:
>>
>> IMHO we should preserve that a == (a//b)*b + a%b.  This means that we
>> should either change both division and modulo, or neither. 
>>     
>
> Please let simple C types behave like simple C types and Python objects 
> like Python objects. Even if it means 1/1 will return 1.0 i Python 3 and 
> 1 in Cython.
>   
Could you provide some specific examples where this is more convenient? 
I already argued the opposite from the "don't break algorithms when 
adding types for speed"-perspective (which is a very common way of using 
Cython).

(I.e. it's fine that *your* knowledge of C is in place and that you 
expect Cython to behave like C here, but what will give least surprise 
to new Python user wanting to speed up his or her code? My point is that 
Cython users come from different backgrounds and will expect different 
things. When specific usecases are presented, we can bring this 
discussion beyond personal taste and what  whomever uses Cython right 
now "already knows").

(BTW Python semantics for division means that Cython has Python 2 
semantics for "/" unless from __future__ import division is specified.)

Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to