Y
Hacker News
new
|
ask
|
show
|
jobs
by
shoyer
4487 days ago
You create a list, so this expression won't shortcut like or. Or is definitely the right way to write an expression like this. Any has its place, but mostly when it's input is a generator, e.g.,
any(k in obj for k in other)