On Mon, Nov 29, 2010 at 9:20 PM, Vitja Makarov <[email protected]> wrote: > 2010/11/30 Robert Bradshaw <[email protected]>: >> On Mon, Nov 29, 2010 at 12:27 PM, Greg Ewing >> <[email protected]> wrote: >>> Stefan Behnel wrote: >>> >>>> * it makes the inner C function directly callable, thus making it easier to >>>> implement things like cpdef functions and generators on top. >>> >>> If you mention the name of such a function without calling it, >>> does it refer to the C function or the Python function? >> >> That would depend on the context in which it's being used. >> Essentially, the as_variable attribute would be set, allowing it to >> coerce to a Python object if need be. >> > > I see problem with closures here where should scope object be created > in C function or in wrapper?
The only handle you can get of a closure object is a Python one. (Well, eventually we want to have cdef closures, but we're not there yet, and wouldn't be compatible with cdef functions--we'd probably expose them as structs with a state and function pointer attributes.) - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
