[New-bugs-announce] [issue46533] Specialize for staticmethods and classmethods
Mark Shannon
report at bugs.python.org
Wed Jan 26 05:01:18 EST 2022
New submission from Mark Shannon <mark at hotpy.org>:
Calls of the form `x.m(args)` where either `x = X` or x = X()` and X is a class, and `m` is a classmethod or staticmethod are not currently specialized.
Typically the `x.m()` will translate to:
LOAD_FAST x
LOAD_METHOD "m"
PRECALL_METHOD 0
CALL 0
Since classmethods and staticmethods are descriptors, only the LOAD_METHOD should need specializing. The PRECALL/CALL will be able to handle the resulting values without modification.
----------
messages: 411725
nosy: Mark.Shannon, kj
priority: normal
severity: normal
status: open
title: Specialize for staticmethods and classmethods
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46533>
_______________________________________
More information about the New-bugs-announce
mailing list