A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-December/151453.html below:

[Python-Dev] Supporting functools.singledispatch with classes.

[Python-Dev] Supporting functools.singledispatch with classes. [Python-Dev] Supporting functools.singledispatch with classes.Nick Coghlan ncoghlan at gmail.com
Mon Dec 25 19:41:59 EST 2017
On 25 December 2017 at 12:32, Ethan Smith <ethan at ethanhs.me> wrote:
> So at the moment, I don't think it is possible to implement singledispatch
> on classmethod or staticmethod decorated functions.

I've posted this to the PR, but adding it here as well: I think this
is a situation very similar to the case with functools.partialmethod,
where you're going to need to write a separate
functools.singledispatchmethod class that's aware of the descriptor
protocol, rather than trying to add the functionality directly to
functools.singledispatch.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4