> http://python.org/sf/973103 points to two interesting bugs in Python: > > First, using a re-raise after the except-block has completed will > still re-raise the last exception. Even though the language spec > is ambiguous (what is the "last expression that was active in the > current scope" (*)), I doubt this is intended. Actually, it *is* intended. The exception state remains valid until another exception is raised in the same or an outer scope. > It then also shows that the error you "normally" get for a reraise > in absence of an exception is > > TypeError: exceptions must be classes, instances, or strings > (deprecated), not NoneType > > I think this is in violation of the language description, which says > > "If no exception is active in the current scope, an exception is raised > indicating this error." > > "This" error probably being "no active exception", not "exception must > not be NoneType". > > What do you think? Here I agree -- the error message is a little dumb. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4