Share your repls and programming experiences

← Back to all posts
(somewhat) dead simple multiple dispatch
a5rocks (821)

Now, I know this is python, and really low effort, but this is a Proof of Concept.

PS If you can think of a way for **kwargs to work well, I would really thank you :D

PPS Just realized how much I failed at being able to use proper types (typing.List[int] for example, I'll try fixing this...)

MarcusWeinberger (774)

Damn this is pretty sick!

Thecrowbar1234 (144)

yeah whats this supposed to do?

EthanCulp (34)

What is the use of this? I'm sorry but I am really confused

Warhawk947 (554)

what is this supposed to do?

a5rocks (821)

@Warhawk947 this is supposed to allow you to specify which functions get called on special types, so for example you could make a function foo that raises an error except when the type of the argument is list, in which case it would call a different function.