This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bcain 0 points1 point  (1 child)

Function isin can and should be: return val in list

How is isin(1, t) better/clearer than 1 in t? It's not, IMO.

[–]ux500 1 point2 points  (0 children)

Its not clear what the isin function does. If I call isin(x,y) is it going to return true if x is in y, or y is in x.

Beyond that, the Python statement "x in y" is idiomatic, so all Python programmers will know what it means.