Created
October 6, 2016 21:22
-
-
Save Lucretiel/ca17c3b11d85ba3f16cdc3c8d37a2ba9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def emit(list_of_elements): | |
for elem in list_of_elements: | |
if elem.thing1 > 0: | |
yield elem.thing1 | |
if elem.thing2 < 0: | |
yield elem.thing2 | |
if elem.thing3 != 0: | |
yield elem.thing3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment