Robert Bradshaw wrote:
> One hitch that we ran into with closures (and the main reason IMHO that we 
> didn't have time to finish them up like planned) is that variables are not 
> bound at creation time, rather the scope is bound. Thus a function 
> containing a closure needs to have special code as well as the inner 
> function itself.

To be even more specific, it would help if self.result_code everywhere 
was calculated during code generation rather than type analysis (because 
then you could modify the scope after type analysis to move around the 
variables like you want to). This will clean up a lot of things IMO. I 
looked at it and it didn't look too difficult in principle to do that 
refactoring, perhaps a day or two. I suggest this as a dependency for 
closures (I think it was possible without but more of a mess code-wise 
that way...).

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

Reply via email to