On 7/2/2010 12:43 AM, Glyph Lefkowitz wrote: >> def f(): return 1 + "1" >> >> instead of compiling something which can't fail to raise an >> exception, would that still be a legal Python implementation? > > I'd say "no". Python has defined semantics in this situation: a > TypeError is raised. The manuals are rather inconsistent about defining the exception semantics. Some parts define the exception returned. Other, equivalent parts, do not. I should start a separate thread on this when I find the examples I once had. -- Terry Jan Reedy
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