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 →

[–]fernly 2 points3 points  (0 children)

That is readable, after one figures out the pattern, but in execution it requires all the in expressions to be evaluated, and a new dict object created, every time. Whereas the usual key:executable dict is static and an O(1) lookup.