Y
Hacker News
new
|
ask
|
show
|
jobs
by
rjprins
4456 days ago
The __contains__ does this for you with the more readable 'in' keyword.
1 comments
jzwinck
4456 days ago
That checks whether a key exists. Your parent wants to check whether a value exists. Not that I'm any huge fan of it, considering how it would be inefficient by default.
link
dec0dedab0de
4456 days ago
You can use the values, or items method with in.
link