singledispatch for methods

Hi All, functools.singledispatch does not work on methods. There are 2 packages that do this for methods one on GitHub only https://gist.github.com/adamnew123456/9218f99ba35da225ca11 and my pypi package https://pypi.org/project/methoddispatch/. There are also a couple of stack overflow posts about it ( https://stackoverflow.com/questions/24601722/how-can-i-use-functools-singled... , https://stackoverflow.com/questions/24063788/python3-singledispatch-in-class... ) with about 60 votes between them. Is it time to add singledispatch for methods to the core library? If so, would the methoddispatch implementation suffice or are there changes you would like made? Thanks for your time.

On Tue, Mar 26, 2019, 1:09 PM Tim Mitchell <tim.mitchell.chch@gmail.com> wrote:
Is it time to add singledispatch for methods to the core library?
What's the motivation for it, beyond the fact that it's possible? Regarding jargon, aren't Python's instance methods are already single-dispatch, because they receive the instance as the first argument?

On Wed, Mar 27, 2019 at 5:09 AM Tim Mitchell <tim.mitchell.chch@gmail.com> wrote:
Is it time to add singledispatch for methods to the core library? If so, would the methoddispatch implementation suffice or are there changes you would like made?
singledispatchmethod will be added in Python 3.8. Please try Python 3.8a3! https://docs.python.org/3.8/library/functools.html#functools.singledispatchm... https://www.python.org/downloads/release/python-380a3/ -- Inada Naoki <songofacandy@gmail.com>
participants (3)
-
Inada Naoki
-
Michael Selik
-
Tim Mitchell