See also the relevant section of enhancements.
Unsupported Python Features
One of our goals is to make Cython as compatible as possible with standard Python. This page lists the things that work in Python but not in Cython.
Nested def statements
def make_func():
def f(x):
return x*x
return f(work in progress) This relies on functional closures
http://trac.cython.org/cython_trac/ticket/82
Generators
Using the yield keywords. (work in progress) This relies on functional closures
http://trac.cython.org/cython_trac/ticket/83
Modulo '%' operation on floats (DONE)
a = b%c
where b and c are floats will raise the error "Invalid operand types for '%' (float; float)"
This can currently be worked around by putting
cdef extern from "math.h":
double fmod(double x, double y)somewhere is the source file and then using
a = fmod(b,c)
See http://lists.copyleft.no/pipermail/pyrex/2007-May/002372.html
http://trac.cython.org/cython_trac/ticket/84
locals() and globals() functions (locals() DONE)
http://trac.cython.org/cython_trac/ticket/85 http://trac.cython.org/cython_trac/ticket/86
definitions in control structures
Class and function definitions cannot be placed inside control structures.
