Message342566
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. |
|
Date |
User |
Action |
Args |
2019-05-15 11:58:26 | jdemeyer | set | recipients:
+ jdemeyer, petr.viktorin, Mark.Shannon |
2019-05-15 11:58:26 | jdemeyer | set | messageid: <1557921506.83.0.125634021475.issue36924@roundup.psfhosted.org> |
2019-05-15 11:58:26 | jdemeyer | link | issue36924 messages |
2019-05-15 11:58:26 | jdemeyer | create | |
|