> Pattern: NewError = 'NewError' --> class NewError(Exception): pass > Idea: String exceptions are deprecated, derive from Exception base class. > Version: Any > Benefits: String exceptions will not work in future versions. Allows except Exception: clause to work. > Locating: Use PyChecker Should also warn against class exceptions not deriving from Exception. Be careful about generic phrases like "String exceptions will not work in future versions." Some people (especially those who tend to fear change ;-) start to panic when they read this, thinking it might be in 2.4. I don't think we'll be able to delete string exceptions before Python 3.0, so you can be explicit in this case. --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