Created
October 7, 2015 09:41
-
-
Save poros/0241e2a996ff57f398fb to your computer and use it in GitHub Desktop.
Trace a generator for debugging
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 trace(source): | |
for item in source: | |
print item | |
yield item | |
r404 = trace(r for r in log if r['status'] == 404) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment