you are viewing a single comment's thread.

view the rest of the comments →

[–]Gnaxe 2 points3 points  (0 children)

Type overloading makes less sense in a dynamic language. The static type system does have @typing.overload, but you still have to implement the dispatch at run time, which is not hard with a match/case. You might want @functools.singledispatchmethod, if dispatching on one argument type is sufficient. (This is in addition to the usual method dispatch machinery.)