My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 133: generators cannot be exported from extension modules
2 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----


Sign in to add a comment
 
Reported by ntos...@gmail.com, Mar 7, 2011
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.
Mar 9, 2011
Project Member #1 mark.duf...@gmail.com
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..
Status: Accepted
May 25, 2011
Project Member #2 mark.duf...@gmail.com
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.
Jun 25, 2011
Project Member #3 mark.duf...@gmail.com
 Issue 140  has been merged into this issue.
Jul 24, 2011
Project Member #4 mark.duf...@gmail.com
(No comment was entered for this change.)
Labels: -Type-Defect Type-Enhancement
Sign in to add a comment

Powered by Google Project Hosting