[Cython] Prototype patch for closures/inner functions
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Wed Apr 9 12:30:17 CEST 2008
>
> Known fatal bugs:
> - I don't know the first thing about reference counting, CPython etc..
> At least on one occasion I messed up GC-ing. This is probably
> something that others will be much quicker at spotting.
> - No name mangling, inner functions cannot collide in name with outer.
> Quick fix but don't have time now; also one might want a more generic
> "name mangler" support mechanism rather than just checking for
> collisions, not sure about how to do this.
> - No consideration for anything nontrivial: The global keyword and
> accessing variables in modules comes to mind.
Add this one:
- If the inner function calls cdef functions, one will have problems
because it will try to include the name of the cdef function in the closure.
I guess this really wasn't that ready. But as I said, I have to take a
break and better to post anything at all. +, if I'm heading in the wrong
direction (scope is already calculated...) someone can help me out.
--
Dag Sverre
More information about the Cython-dev
mailing list