[Python-ideas] Arguments to exceptions

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Jul 4 18:31:45 EDT 2017


Terry Reedy wrote:
> Attaching a *constant* string is very fast, to the 
> consternation of people who would like the index reported.

Seems to me that storing the index as an attribute would help
with this. It shouldn't be much slower than storing a constant
string, and formatting the message would be deferred until
it's needed, if at all.

-- 
Greg


More information about the Python-ideas mailing list