You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…nels (#36358)
### Rationale for this change
`TypeError` should be returned when `values` and `value_set` have incompatible types in IsIn and IndeIx.
`Invalid` is still returned if the types are compatible but casting the values fails (for example because of overflow or truncation).
### What changes are included in this PR?
When casting between types is not supported, return TypeError instead of Invalid.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* Closes: #36345
Authored-by: Jin Shang <shangjin1997@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Describe the enhancement requested
When input type and value_set type miss match, TypeError should be used instead of Invalid.
Component(s)
C++
The text was updated successfully, but these errors were encountered: