Created
June 23, 2015 09:44
-
-
Save tai/2880c4af4037fa61419c to your computer and use it in GitHub Desktop.
Python bug or feature? I hate it.
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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| def check(v, trace=[]): | |
| print("check: entered") | |
| if trace: | |
| print("trace: " + str(trace)) | |
| try: | |
| trace.append(1) | |
| raise Exception() | |
| trace.pop() | |
| except: | |
| pass | |
| check(1) | |
| check(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment