Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on The Python dictionary dispatch pattern. Parent comment
But if the keys are known statically (as in the article), I think it's generally better to use named functions.
But it's good to be aware of the capability, for cases like you're describing.
There are no comments on this comment yet.
But if the keys are known statically (as in the article), I think it's generally better to use named functions.
But it's good to be aware of the capability, for cases like you're describing.