else with loops
else block perfoms when break doesn’t happen
while else can be useful for …
searching failure
else with try
when no exceptions occured
dispatch on type decorator
@functools.singledispatch
example of using singledispatch
@singledispatch
def fun(arg):
…
@fun.register(int):
def _(arg):
...@fun.register(list):
…