News for hackers. Stuff that matters.
Re:The Python dictionary dispatch pattern by sanderjd on Tuesday August 29, 2023 @08:37AM (#37306836)
This doesn't sound like a bad pattern to me. (Though I certainly think I have seen bad implementations of it.)

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.