poppopjmp / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

generators cannot be exported from extension modules #133

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
To reproduce, create and compile a simple extension module:

def int_gen(i):
    yield i+1

def test_f(i):
    return int_gen(i).next()

if __name__=='__main__':
    print test_f(3)

What is the expected output? What do you see instead?

You can import from the module test_f, but not int_gen.

Original issue reported on code.google.com by ntos...@gmail.com on 7 Mar 2011 at 3:52

GoogleCodeExporter commented 8 years ago
thanks for reporting!

I guess generators are explicitly disabled, because I wasn't sure how to 
implement them. I'm still not sure, but will have a look at this for 0.8..

Original comment by mark.duf...@gmail.com on 9 Mar 2011 at 10:56

GoogleCodeExporter commented 8 years ago
thanks again for reporting this. I'm afraid a solution didn't make it into 0.8, 
but I will get to it at some point.

Original comment by mark.duf...@gmail.com on 25 May 2011 at 7:44

GoogleCodeExporter commented 8 years ago
Issue 140 has been merged into this issue.

Original comment by mark.duf...@gmail.com on 25 Jun 2011 at 4:18

GoogleCodeExporter commented 8 years ago

Original comment by mark.duf...@gmail.com on 24 Jul 2011 at 12:51