Python 3 – Function Overloading with singledispatch
Python fairly 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 your regular function into a single dispatch generic function. Note however that singledispatch only happens based on the first argument’s type. Let’s take a … Continue reading Python 3 – Function Overloading with singledispatch
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed