Vladimir.Marangozov@inrialpes.fr: > Yes. Besides, I still think that string-based exceptions are just > convenient for quick & dirty, throw-away test scripts. They have a hard-to-understand quirk though: the id() of the string is used to check rather than its value, so that except "foo" doesn't necessarily catch raise "foo"; but due to various optimization, this usually works, and people get bent out of shape when it doesn't. Since you have to give your exception a name, how hard is it to say class MyError(Exception): pass rathern than MyError = "MyError" ? --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