Can shed skin export generators from shed skin-built code to CPython code? #421
Replies: 6 comments 1 reply
-
If I call the generator from the Shedskin code to the Shedskin code, the yield seems to work. |
Beta Was this translation helpful? Give feedback.
-
I tried:
It showed up in dir(), but foo_iter didn't appear to have |
Beta Was this translation helpful? Give feedback.
-
I tried calling foo_iter(5) from shedskin-compiled code, and got: |
Beta Was this translation helpful? Give feedback.
-
hi dan! yeah, these are currently not exported, so you'll have to find a work-around. I don't know if I will ever get around to implementing this.. |
Beta Was this translation helpful? Give feedback.
-
older issue about this: |
Beta Was this translation helpful? Give feedback.
-
btw we probably need at least a warning when generating the extension module.. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've got a module that works on CPython 3.11. It has a couple of functions, and a couple of generators, and a class.
If I compile it with shedskin, then I can see the functions and the class in a dir(), but I don't see the generators. No error is emitted for the yield commands.
Is shedskin able to export a generator from shedskin-compiled code to CPython code? If no, is there a practical workaround?
Beta Was this translation helpful? Give feedback.
All reactions