Hmm. I’m not sure where I fall on this. I can appreciate that the haystack may have a type and you might want to restrict the type over the operand in some situations but it seems like a method like has_value should be lenient with respect to the value being searched for.
Sent from my iPhone > On Mar 13, 2025, at 1:13 PM, Chris Angelico <[email protected]> wrote: > > On Fri, 14 Mar 2025 at 03:31, Marcos Cruz <[email protected]> wrote: >> So somehow the problem happens when the array argument is a literal, >> both in hilfe and in a file. > > When you use literals, yes, has_value expects that the argument makes > sense. But normally you'll be using a variable for one or both of its > arguments, so the expectation of the function will match your mental > expectation and it should be more reasonable. > > ChrisA >
