[Python-ideas] staticmethod and classmethod should be callable

Guido van Rossum guido at python.org
Wed Jun 20 12:37:04 EDT 2018


On Wed, Jun 20, 2018 at 9:31 AM Serhiy Storchaka <storchaka at gmail.com>
wrote:

> 20.06.18 19:20, Guido van Rossum пише:
> > +1 -- when we introduced these we didn't see the use case so clearly,
> > but it definitely exists.
>
> How would you call a classmethod descriptor in this case?
>

With an extra first argument that's a class -- it should just call the
wrapped function with whatever args are presented to the descriptior.

-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180620/1b74b1b7/attachment-0001.html>


More information about the Python-ideas mailing list