6 Comments
User's avatar
Nono Carballo's avatar

Very interesting post

Expand full comment
Igor Marcos Riegel's avatar

It's not missing on Python, function overload is available via single dispatch in the Python Functools module.

https://docs.python.org/3/library/functools.html#functools.singledispatch

Expand full comment
Nono Carballo's avatar

This decorator works only on the type of the first function argument.

Expand full comment
Igor Marcos Riegel's avatar

You are correct, I missed this detail.

But the title can be misleading once there's no mention of the native singledispatch.

The lib might be a little better than the native option, but we have a native implementation.

Expand full comment
Nono Carballo's avatar

Agree 100% with you.

Expand full comment
Santiago Vasconcello's avatar

I want to tell you that I love your blog and that I read it every day, you have been a help for my thesis and you are currently my browser home page. I only wish you the best and as soon as I get a job I will join the premium. Greetings from Chile 🙂🇨🇱

Expand full comment