> So a cdef int s a py_int, but a cdef float is not a py_float? No. Clarifying my above idea -- to the programmer, a cdef int would be a c int, a cdef float would be a c float, a py_int would be a python int, and a py_float would be a python float. In the generated c code, a cdef py_int could be a c long or c long long with python operations and a py_float would be a c double.
To step back -- if the only way to drop into fast compiled code is to learn c semantics, it will cause problems for people who just want to cythonize their python code. If you use python semantics, it will cause problems for people who are c programmers using cython to write mixed python-c code. So doing this seems to give everyone something they like. I'm also thinking of proposed steps in the cython development such as automatically determining types (e.g. of a in 'a = 5'). Having a python integer would make that easier. --Hoyt ++++++++++++++++++++++++++++++++++++++++++++++++ + Hoyt Koepke + University of Washington Department of Statistics + http://www.stat.washington.edu/~hoytak/ + [email protected] ++++++++++++++++++++++++++++++++++++++++++ _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
