[Python-ideas] singledispatch for instance methods

Steven D'Aprano steve at pearwood.info
Sun May 14 13:18:39 EDT 2017


On Sun, May 14, 2017 at 04:37:32PM +0000, Bar Harel wrote:
> I guess so.
> 
> Sorry for that.
> To be honest I'm not entirely sure of the entire procedure and if small
> things need a PEP or not. I actually received the tip to bump from
> core-mentorship, so now I'm rather confused.

If you are referring to the Core-mentorship at python.org mailing list, I 
don't recall seeing anyone tell you to send a "Bump" message. Perhaps I 
missed it?

In any case, it's not so much the bump as the brusque, excessively terse 
manner in which you put it. A single word "bump" to get people's 
attention comes across as rather rude, unless you know them well.

For example, at my work, we often use "ping" to get someone else's 
attention or remind them to answer a question. But we would never do so 
to a customer or supplier, or people we didn't know well. Like a mailing 
list full of strangers from all over the world :-)

As far as the proposal here, singledispatch for methods, I think we have 
to go back to September last year for the original announcement/query 
from Tim Mitchell:

https://mail.python.org/pipermail/python-ideas/2016-September/042466.html


Unfortunately that seemed to be an extremely busy month of wild ideas on 
the mailing list, and long arguments that went around and around in 
circles. I guess that many people must have felt burned out by the 
volume of messages, or simply missed Tim Mitchell's post. I remember 
seeing it, and simply not having the time or energy to have an opinion.

Quoting Tim:

    We have a modified version of singledispatch at work which works
    for methods as well as functions.  We have open-sourced it as
    methoddispatch (pypi: https://pypi.python.org/pypi/methoddispatch).

    IMHO I thought it would make a nice addition to python stdlib.

    What does everyone else think?


I don't have any objection to being able to use single dispatch on 
methods. To be honest, I assumed that singledispatch already did work on 
methods! 



-- 
Steve


More information about the Python-ideas mailing list