...
/Functools: functools.singledispatch
Functools: functools.singledispatch
Let's discover functool modules and how functions can be overloaded.
Overview of singledispatch module
Python recently added partial support for function overloading in Python 3.4. They did this by adding a neat little decorator to the
functools
module called singledispatch
. This decorator will transform our regular function into a single dispatch generic function. Note
however that singledispatch
...
Access this course and 1400+ top-rated courses and projects.