On Feb 2, 2010, at 2:01 PM, Christopher Barker wrote:

> Dag Sverre Seljebotn wrote:
>> The alternative then appears to be
>>
>> from cython.c.math cimport sqrt
>> from cython.python cimport Py_INCREF
>>
>> but that's awfully verbose.
>
> I LIKE verbose imports -- that's what "from" is for. The import can be
> verbose (and clear, and unlikely to name clash), while the rest of  
> your
> code is as terse as you like.
>
> If this is all cython stuff, it should live in the cython namespace.


I like clib or libc (with or without the cython prefix) better than  
just plain c. There's also the consideration question of supporting  
pure mode, currently cython.* is all directives/other builtins, this  
conflates the idea a bit. In the C++ branch we now have  
cython.operator (where dereference, preincrement, etc. all live).

Eventually, for math, it would be nice if Cython called the  
corresponding C operators directly when acting on C types. (Dag has  
brought this up before.) One caveat is that often Python floats have  
better error handling/corner case handling than clib, and also  
many .pxds we would like to ship are not necessarily basic Python  
modules.

- Robert

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

Reply via email to