We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

haki • 6 years ago

Thanks john, a very interesting article. How is this related / compared to functools.singledispatcher?

https://docs.python.org/3/l...

John Freeman • 6 years ago

I've been getting this question everywhere. I never realized so many people use `functools.singledispatch`! I've never seen it used or mentioned in the wild. The major differences with this are:
1. You can put the type parameter anywhere in the argument list, not just the first position.
2. You can define overloads for protocols (structural types) in addition to types.

Nikita Sobolev • 6 years ago

Awesome article! I guess you might also like our typed monads library: https://github.com/dry-pyth...