Often times I find myself having to run different sections of functions depending on what custom type was passed in etc.
I regularly then use a string and test the current entity for it.
if type =='A':
do_this
elif type = 'B':
do_that
but that doesnt seem natural. What is the canonical way in Python to distinguish execution paths depending on the identity of entities? It does not feature a constexpr_if like C++ does