Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
rjprins
on April 8, 2014
|
parent
|
context
|
favorite
| on:
Python 3.5 to Ship with Matrix Multiplication Oper...
The __contains__ does this for you with the more readable 'in' keyword.
jzwinck
on April 8, 2014
[–]
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.
dec0dedab0de
on April 8, 2014
|
parent
[–]
You can use the values, or items method with in.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: