On Fri, 2004-03-19 at 17:30, Jewett, Jim J wrote: > A class can be defined in a single place (and imported); > a typo in the 47th raise statement will show up as a syntax > error instead of a runtime bug. Yes, but I'll just note that this is "safe": foo.py ------ Error = 'Bogus Error' def foo(): ... raise Error bar.py ------ import foo try: foo.foo() except foo.Error: # oops! That works because you're raising and catching the same object. String exceptions still suck though. :) -Barry
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