Function overloading in Python (via dispatch)

preview_player
Показать описание
Featuring both functools' singledispatch and the third party multipledispatch.



If you enjoy my content, consider supporting me on Patreon or becoming a member!

If you need help with anything, feel free to join the Discord server:

I get a lot of people asking, so here's my Visual Studio Code setup!



If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so.

#python #coding #howto
Рекомендации по теме
Комментарии
Автор

I think this is very nice... I really missed this a lot in Python for a long time. I was just wondering where you would place your docstrings or how does that even work?

yefritavarez
Автор

what about @overload decorator? (PEP 3124) it allows you to define alternate implementations of a function, specialized by argument types.

x
Автор

python does have private support: certain attributes can be made private by using a double underscore in front of the attribute.

genemys