gh-62040: Raise ValueError on invalid *errors* argument in several codecs#136611
gh-62040: Raise ValueError on invalid *errors* argument in several codecs#136611StanFromIreland wants to merge 7 commits intopython:mainfrom
ValueError on invalid *errors* argument in several codecs#136611Conversation
ValueError on invalid *errors* parameter in several codecsValueError on invalid *errors* argument in several codecs
|
I can see that there's only some changes from last patch: For example, I'd like to remove also |
|
Ah I forgot about the patch and my grep was too strict, I'll fix all the self.errors cases. |
|
|
||
| ### Codec Helpers | ||
|
|
||
| def _assert_strict(errors): |
There was a problem hiding this comment.
Maybe _check_strict from the original patch would be better?
There was a problem hiding this comment.
I prefer assert_strict since it is closer to what was there before, and it is more obvious, to me at least, that it will fail if errors != 'strict', whereas check_strict, seems like something that will enable more verbose errors or the like.
There was a problem hiding this comment.
IMO, it's not fully correct to name method assert_something and don't make any assert checks or raising an AssertionError.
There was a problem hiding this comment.
@malemburg which do you prefer? _check_strict or _assert_strict
This comment was marked as outdated.
This comment was marked as outdated.
|
Little ping @malemburg :-) |
assertfor runtime validity checks #62040