Check it out: http://python.org/sf/532638 *Someone* has written a "lazy msg exception class" before in the core, and it may even have been me. If it wasn't me, pipe up and give Skip a nudge in the right direction (OTOH, if it was me, maybe I'll remember tomorrow). Another good candidate would be a lazy exception msg for IndexError, giving the index passed in and the actual limit (that also came up on c.l.py over the last week). Since AttributeErrors and IndexErrors are overwhelmingly ignored (recall that IndexError was the only way to terminate a for loop normally via exhaustion before 2.2), paying to format a message before the string is provably needed is overwhelmingly a waste of cycles. Even calling PyErr_Format() to interpolate two strings (as AttributeError often does today) seems a significant bit of work to throw away routinely.
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