Message407737
One potential solution would be to add two Py_ssize_t to IndexError, storing the index and length along with the existing exception value. Then __str__() can append that to the message if set, perhaps having len be negative to signal they're not passed.
An issue though is that it might be backwards incompatible with classes trying to multiply inherit from other exceptions too. To deal with that it could put the values in the args tuple, though then it'd have to allocate the tuple and ints which might hurt perf. |
|
Date |
User |
Action |
Args |
2021-12-05 20:35:28 | Spencer Brown | set | recipients:
+ Spencer Brown, aroberge, serhiy.storchaka, pablogsal, remi.lapeyre, miguendes, mishra.akash.myself |
2021-12-05 20:35:28 | Spencer Brown | set | messageid: <1638736528.04.0.22354708558.issue44166@roundup.psfhosted.org> |
2021-12-05 20:35:28 | Spencer Brown | link | issue44166 messages |
2021-12-05 20:35:27 | Spencer Brown | create | |
|