This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients anthonypjshaw, atalaba, iritkatriel, serhiy.storchaka, vstinner
Date 2021-09-29.07:35:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> We could just forbid error handlers returning position not in the range (start , end]

Yeah, that sounds like a reasonable solution. I don't see the point of returning a position outside this range. What would be the use case?

For me, the only corner case is the "ignore" error handler which returns an empty string, but it returns a position in this range, no?

> it can break some code, so it is better to do this only in a new release.

Implementing custom error handlers is a rare use case, so it should only affect a minority of users. Moreover, IMO returning a position outside the valid range is a bug. It's common that security fixes change the behavior, like rejecting values which were previously acceptd, to prevent a Python crash.
Date User Action Args
2021-09-29 07:35:23vstinnersetrecipients: + vstinner, serhiy.storchaka, anthonypjshaw, atalaba, iritkatriel
2021-09-29 07:35:23vstinnersetmessageid: <>
2021-09-29 07:35:23vstinnerlinkissue36819 messages
2021-09-29 07:35:22vstinnercreate