New submission from Jeroen Demeyer <j.deme...@ugent.be>:

The class classmethod_descriptor implements classmethods for builtin functions. 
Unlike the plain classmethod class (which is used for Python classmethods), 
instances of classmethod_descriptor are callable. However, calling them is 
unlikely to happen in practice: the only way to obtain such an object is to 
extract from the class __dict__.

Therefore, the implementation of __call__ does not need to be optimized: we can 
just call __get__ and then call the result. Doing that allows a simpler 
implementation of PEP 590.

----------
components: Interpreter Core
messages: 342566
nosy: Mark.Shannon, jdemeyer, petr.viktorin
priority: normal
severity: normal
status: open
title: Simplify implementation of classmethod_descriptor.__call__
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36924>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to