33
The Python dictionary dispatch pattern
(jamesg.blog)
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
Broadly, this is a simple version of the Strategy Pattern, which is incredibly useful for making flexible software.
In Python, the example given is basically the classic bodge attempt to emulate switch-case statements.