<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 26 December 2017 at 01:41, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 25 December 2017 at 12:32, Ethan Smith <<a href="mailto:ethan@ethanhs.me">ethan@ethanhs.me</a>> wrote:<br>
> So at the moment, I don't think it is possible to implement singledispatch<br>
> on classmethod or staticmethod decorated functions.<br>
<br>
</span>I've posted this to the PR, but adding it here as well: I think this<br>
is a situation very similar to the case with functools.partialmethod,<br>
where you're going to need to write a separate<br>
functools.singledispatchmethod class that's aware of the descriptor<br>
protocol, rather than trying to add the functionality directly to<br>
functools.singledispatch.<br></blockquote><div><br></div><div>I agree with Nick here. Adding a separate decorator looks like the right approach,</div><div>especially taking into account the precedent of @partialmethod.</div><div><br></div><div>--</div><div>Ivan</div><div><br></div><div><br></div></div></div></div>