Skip to content

Instantly share code, notes, and snippets.

@thezerobit
Created May 30, 2014 15:11
Show Gist options
  • Save thezerobit/724ed47128252c476302 to your computer and use it in GitHub Desktop.
Save thezerobit/724ed47128252c476302 to your computer and use it in GitHub Desktop.
yield_from macro for Boo
# Boo macro for delegating to subgenerators ala PEP 380
macro yield_from:
yield [|
for _x in $(yield_from.Arguments[0]): yield _x
|]
def myrange():
yield_from range(99)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment