Created
January 19, 2018 19:51
-
-
Save patrickgombert/ea63a2b5fe42f9479df138be327aa027 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
>>> if True: | |
... for i in [1, 2]: | |
... print(i) | |
... else: | |
... print("else") | |
... | |
1 | |
2 | |
else | |
>>> def foobar(): | |
... for i in []: | |
... pass | |
... else: | |
... print("else") | |
... | |
>>> foobar() | |
else | |
>>> def foobar(): | |
... for i in []: | |
... raise Exception() | |
... else: | |
... print("else") | |
... | |
>>> foobar() | |
else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment