Guido van Rossum <guido@python.org> writes: > > http://python.org/sf/518846 reports that new-style classes cannot be > > used as exceptions. I think it is desirable that this is fixed, but I > > also believe that it conflicts with string exceptions. > > Can you explain this conflict? Couldn't this be worked around by > making an exception for strings? Currently, if you write try: raise "Hallo" except str: pass the exception will pass through. If "new-style classes" (aka types) are allowed, then the string /should/ be caught. > I think string exceptions are used enough that we should deprecate > them on a slower schedule. If you follow Paul's rationale (exceptions should inherit from Exception), then the bug report could be closed, and no action would be needed until Exception becomes a type. Regards, Martin
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