really exotic approach to expressing conditionals as dispatch decisions is to include predicates directly within the function signatures (or perhaps within decorators on themas with multipledispatchi do not know of any well-maintained python library that does thisbut let us simply stipulate hypothetical library briefly to illustrate the concept this imaginary library might be aptly named predicative_dispatchfrom predicative_dispatch import predicate @predicate(lambda xx lambda ytruedef sign(xy)print(" is negativey is" @predicate(lambda xx = lambda ytruedef sign(xy)print(" is zeroy is" @predicate(lambda xx lambda ytruedef sign(xy)print(" is positivey is"ywhile this small example is obviously not full specificationthe reader can see how we might move much or all of the conditional branching into the function call signatures themselvesand this might result in smallermore easily understood and debugged functions multiple dispatch