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

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.
You can use the values, or items method with in.