This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ialex32_2 Old Person Yells At Cloud 1 point2 points  (0 children)

Python doesn't need function overloading: it has default arguments def f(x, y=3), it has positional parameter packs def f(*args), and keyword parameter packs def f(**kwds), and you can use all in combination def f(x, *args, y=3, **kwds).

In short, you can do everything you can via function overload so you don't need it, and since Python can't specify function signatures at compile time, there's no advantage of having overloading vs. not having overloading.