Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

support 'yield' statements #19

Open
thenewguy opened this issue Nov 20, 2011 · 1 comment
Open

support 'yield' statements #19

thenewguy opened this issue Nov 20, 2011 · 1 comment

Comments

@thenewguy
Copy link

Yield support would be a nice addition.

Pyjamas and Skulpt support yield statements, so it is definitely possible. Skulpt is released under MIT and Pyjamas uses ASL, so there is no harm in looking at the solution they use.

http://pyjs.org/
http://www.skulpt.org/

def test():
    for i in range(1,100):
        yield i

print list(test())

Use the above in the interactive input box on the skulpt.org homepage to see yield support.

@certik
Copy link
Member

certik commented Nov 22, 2011

I definitely agree.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants