Re: [Python-ideas] singledispatch for instance methods
Bump On Wed, Jan 4, 2017, 8:01 PM Lisa Roach <lisaroach14@gmail.com> wrote:
+1 to this as well, I think this would be really useful in the stdlib.
On Mon, Dec 26, 2016 at 5:40 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Any updates with a singledispatch for methods?
On Tue, Sep 20, 2016, 5:49 PM Bar Harel <bzvi7919@gmail.com> wrote:
At last! Haven't used single dispatch exactly because of that. Thank you savior! +1
On Tue, Sep 20, 2016, 6:03 AM Tim Mitchell <tim.mitchell@leapfrog3d.com> wrote:
Hi All,
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?
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
How exactly do you think the process of adopting something into the stdlib works? Just posting "bump" messages to the mailing list doesn't really help, it just sounds rude.If you need help understanding how to add/improve a stdlib module, please ask a specific about that topic. On Sun, May 14, 2017 at 12:43 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Bump
On Wed, Jan 4, 2017, 8:01 PM Lisa Roach <lisaroach14@gmail.com> wrote:
+1 to this as well, I think this would be really useful in the stdlib.
On Mon, Dec 26, 2016 at 5:40 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Any updates with a singledispatch for methods?
On Tue, Sep 20, 2016, 5:49 PM Bar Harel <bzvi7919@gmail.com> wrote:
At last! Haven't used single dispatch exactly because of that. Thank you savior! +1
On Tue, Sep 20, 2016, 6:03 AM Tim Mitchell <tim.mitchell@leapfrog3d.com> wrote:
Hi All,
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?
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido)
PS: I didn't see a message from Lisa on the mailing list -- maybe she replied to you only? On Sun, May 14, 2017 at 9:25 AM, Guido van Rossum <guido@python.org> wrote:
How exactly do you think the process of adopting something into the stdlib works? Just posting "bump" messages to the mailing list doesn't really help, it just sounds rude.If you need help understanding how to add/improve a stdlib module, please ask a specific about that topic.
On Sun, May 14, 2017 at 12:43 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Bump
On Wed, Jan 4, 2017, 8:01 PM Lisa Roach <lisaroach14@gmail.com> wrote:
+1 to this as well, I think this would be really useful in the stdlib.
On Mon, Dec 26, 2016 at 5:40 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Any updates with a singledispatch for methods?
On Tue, Sep 20, 2016, 5:49 PM Bar Harel <bzvi7919@gmail.com> wrote:
At last! Haven't used single dispatch exactly because of that. Thank you savior! +1
On Tue, Sep 20, 2016, 6:03 AM Tim Mitchell < tim.mitchell@leapfrog3d.com> wrote:
Hi All,
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?
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido)
-- --Guido van Rossum (python.org/~guido)
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. Anyway, shall I add it to the bug tracker as an enhancement? On Sun, May 14, 2017, 7:26 PM Guido van Rossum <guido@python.org> wrote:
PS: I didn't see a message from Lisa on the mailing list -- maybe she replied to you only?
On Sun, May 14, 2017 at 9:25 AM, Guido van Rossum <guido@python.org> wrote:
How exactly do you think the process of adopting something into the stdlib works? Just posting "bump" messages to the mailing list doesn't really help, it just sounds rude.If you need help understanding how to add/improve a stdlib module, please ask a specific about that topic.
On Sun, May 14, 2017 at 12:43 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Bump
On Wed, Jan 4, 2017, 8:01 PM Lisa Roach <lisaroach14@gmail.com> wrote:
+1 to this as well, I think this would be really useful in the stdlib.
On Mon, Dec 26, 2016 at 5:40 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Any updates with a singledispatch for methods?
On Tue, Sep 20, 2016, 5:49 PM Bar Harel <bzvi7919@gmail.com> wrote:
At last! Haven't used single dispatch exactly because of that. Thank you savior! +1
On Tue, Sep 20, 2016, 6:03 AM Tim Mitchell < tim.mitchell@leapfrog3d.com> wrote:
> Hi All, > > 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? > > > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido)
-- --Guido van Rossum (python.org/~guido)
Maybe ask core membership if they meant you to literally just post just the word "bump" to the list (my guess is not). Also the last time I see that you received any advice was a long time ago and regarding to a different issue. For this idea there's no issue and no patch (and core devs aren't required to read python-ideas). Please understand that in this community you are expected to do some work yourself too -- we're not being paid to implement features proposed (or fix bugs reported) by users, we mostly implement/fix things we care about personally, and some of us sometimes volunteer to mentor users who show an interest in learning. IMO posting "bump" several times does not exhibit such interest. On Sun, May 14, 2017 at 9:37 AM, Bar Harel <bzvi7919@gmail.com> 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.
Anyway, shall I add it to the bug tracker as an enhancement?
On Sun, May 14, 2017, 7:26 PM Guido van Rossum <guido@python.org> wrote:
PS: I didn't see a message from Lisa on the mailing list -- maybe she replied to you only?
On Sun, May 14, 2017 at 9:25 AM, Guido van Rossum <guido@python.org> wrote:
How exactly do you think the process of adopting something into the stdlib works? Just posting "bump" messages to the mailing list doesn't really help, it just sounds rude.If you need help understanding how to add/improve a stdlib module, please ask a specific about that topic.
On Sun, May 14, 2017 at 12:43 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Bump
On Wed, Jan 4, 2017, 8:01 PM Lisa Roach <lisaroach14@gmail.com> wrote:
+1 to this as well, I think this would be really useful in the stdlib.
On Mon, Dec 26, 2016 at 5:40 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Any updates with a singledispatch for methods?
On Tue, Sep 20, 2016, 5:49 PM Bar Harel <bzvi7919@gmail.com> wrote:
> At last! Haven't used single dispatch exactly because of that. Thank > you savior! > +1 > > On Tue, Sep 20, 2016, 6:03 AM Tim Mitchell < > tim.mitchell@leapfrog3d.com> wrote: > >> Hi All, >> >> 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? >> >> >> _______________________________________________ >> Python-ideas mailing list >> Python-ideas@python.org >> https://mail.python.org/mailman/listinfo/python-ideas >> Code of Conduct: http://python.org/psf/codeofconduct/ > > _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido)
-- --Guido van Rossum (python.org/~guido)
-- --Guido van Rossum (python.org/~guido)
As I said, sorry for that. It's just that I'm not entirely sure there's anything to implement here. The implementation already exists. If it doesn't suffice I will help as much as I can to make sure it works :-) On Sun, May 14, 2017, 7:49 PM Guido van Rossum <guido@python.org> wrote:
Maybe ask core membership if they meant you to literally just post just the word "bump" to the list (my guess is not). Also the last time I see that you received any advice was a long time ago and regarding to a different issue. For this idea there's no issue and no patch (and core devs aren't required to read python-ideas).
Please understand that in this community you are expected to do some work yourself too -- we're not being paid to implement features proposed (or fix bugs reported) by users, we mostly implement/fix things we care about personally, and some of us sometimes volunteer to mentor users who show an interest in learning. IMO posting "bump" several times does not exhibit such interest.
On Sun, May 14, 2017 at 9:37 AM, Bar Harel <bzvi7919@gmail.com> 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.
Anyway, shall I add it to the bug tracker as an enhancement?
On Sun, May 14, 2017, 7:26 PM Guido van Rossum <guido@python.org> wrote:
PS: I didn't see a message from Lisa on the mailing list -- maybe she replied to you only?
On Sun, May 14, 2017 at 9:25 AM, Guido van Rossum <guido@python.org> wrote:
How exactly do you think the process of adopting something into the stdlib works? Just posting "bump" messages to the mailing list doesn't really help, it just sounds rude.If you need help understanding how to add/improve a stdlib module, please ask a specific about that topic.
On Sun, May 14, 2017 at 12:43 AM, Bar Harel <bzvi7919@gmail.com> wrote:
Bump
On Wed, Jan 4, 2017, 8:01 PM Lisa Roach <lisaroach14@gmail.com> wrote:
+1 to this as well, I think this would be really useful in the stdlib.
On Mon, Dec 26, 2016 at 5:40 AM, Bar Harel <bzvi7919@gmail.com> wrote:
> Any updates with a singledispatch for methods? > > On Tue, Sep 20, 2016, 5:49 PM Bar Harel <bzvi7919@gmail.com> wrote: > >> At last! Haven't used single dispatch exactly because of that. >> Thank you savior! >> +1 >> >> On Tue, Sep 20, 2016, 6:03 AM Tim Mitchell < >> tim.mitchell@leapfrog3d.com> wrote: >> >>> Hi All, >>> >>> 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? >>> >>> >>> _______________________________________________ >>> Python-ideas mailing list >>> Python-ideas@python.org >>> https://mail.python.org/mailman/listinfo/python-ideas >>> Code of Conduct: http://python.org/psf/codeofconduct/ >> >> > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido)
-- --Guido van Rossum (python.org/~guido)
-- --Guido van Rossum (python.org/~guido)
On Sun, May 14, 2017 at 05:10:53PM +0000, Bar Harel wrote:
As I said, sorry for that.
It's just that I'm not entirely sure there's anything to implement here. The implementation already exists. If it doesn't suffice I will help as much as I can to make sure it works :-)
I think you've succeeded in bringing the issue to people's attention :-) If you care about this enough to do the work (I don't, I expect this will be my last post on the topic), then I suggest you should: - contact Tim Mitchell and see if his offer of contributing the code still stands; - if so, and there are no conclusive objections on this list, then raise an issue on the bug tracker; - if not, then someone will have to fork Tim's code (assuming the licence allows it) or reimplement it without violating the licence; - somebody will have to make a Push Request on GitHub; that might be you, or it might be Tim; - Tim will need to sign a contributor agreement, since it's his code being used; - See the DevGuide for more details. (I don't remember the URL: unless someone else volunteers it, you can google for it.) And I think I've just hit the limit of how much I care about this issue. It would be nice to have, but I don't care enough to push it forward. Good luck. -- Steve
Thanks Steven. I think you've just concisely summarized the info in this section of the devguide: https://docs.python.org/devguide/stdlibchanges.html On Sun, May 14, 2017 at 10:28 AM, Steven D'Aprano <steve@pearwood.info> wrote:
On Sun, May 14, 2017 at 05:10:53PM +0000, Bar Harel wrote:
As I said, sorry for that.
It's just that I'm not entirely sure there's anything to implement here. The implementation already exists. If it doesn't suffice I will help as much as I can to make sure it works :-)
I think you've succeeded in bringing the issue to people's attention :-)
If you care about this enough to do the work (I don't, I expect this will be my last post on the topic), then I suggest you should:
- contact Tim Mitchell and see if his offer of contributing the code still stands;
- if so, and there are no conclusive objections on this list, then raise an issue on the bug tracker;
- if not, then someone will have to fork Tim's code (assuming the licence allows it) or reimplement it without violating the licence;
- somebody will have to make a Push Request on GitHub; that might be you, or it might be Tim;
- Tim will need to sign a contributor agreement, since it's his code being used;
- See the DevGuide for more details. (I don't remember the URL: unless someone else volunteers it, you can google for it.)
And I think I've just hit the limit of how much I care about this issue. It would be nice to have, but I don't care enough to push it forward.
Good luck.
-- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido)
On Sun, May 14, 2017 at 1:28 PM, Steven D’Aprano <steve@pearwood.info> wrote: - contact Tim Mitchell and see if his offer of contributing the code
still stands;
FWIW, this is a Python implementation of a single-dispatch decorator for methods that I wrote from looking at the stdlib, and that I have used successfully in some projects: from functools import singledispatchfrom functools import update_wrapper def singledispatch_method(method): dispatcher = singledispatch(method) def wrapper(*args, **kw): return dispatcher.dispatch(args[1].__class__)(*args, **kw) wrapper.register = dispatcher.register update_wrapper(wrapper, method) return wrapper -- Juancarlo *Añez*
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@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
participants (4)
-
Bar Harel
-
Guido van Rossum
-
Juancarlo Añez
-
Steven D'Aprano