New submission from Mark Shannon <m...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue46533>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to