Does anybody here know about why DebuggableLambdaBuilder transforms any lambda passed into something that produces a generator?
The point is that, at the moment, for Python generator functions DebuggableLambdaBuilder only receives something that has already been processed by GeneratorRewriter. Thus, the mechanims inside of DebuggableLambdaBuilder to extract/reconstruct a local dictionary produce a result that reflects the modifications by GeneratorRewriter instead of the original Python function. I tried to reverse the invocation order (i.e. first invoke DebuggableLambdaBuilder and only then convert the generator function by GeneratorRewriter into something that can be repeatedly called), but this fails because GeneratorRewriter does not accept the output DebuggableLambdaBuilder ("SystemError: yield and generator must have the same LabelTarget object").
So, the question is whether it is actually a good idea to invoke DebuggableLambdaBuilder before GeneratorRewriter, or to leave the current invocation order and adapt the DebuggableLambdaBuilder machinery to also deal with the modifications performed by GeneratorRewriter.
Thanks for providing any insights.
Kuno
_______________________________________________ Ironpython-users mailing list Ironpython-users@python.org https://mail.python.org/mailman/listinfo/ironpython-users