This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Mark.Shannon, mark.dickinson, methane, rhettinger, serhiy.storchaka, vstinner
Date 2021-04-09.07:49:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617954553.47.0.0825960331593.issue43682@roundup.psfhosted.org>
In-reply-to
Content
Currently pydoc on X.sm gives:
---
sm(x, y)
    A static method
---


I concur with Mark Shannon. The root problem is that Python functions and built-in functions have different behavior when assigned as class attribute. The former became an instance method, but the latter is not.

If wrap builtin open with statickmethod, the repr of open will be something like "staticmethod(<function open at 0x7f03031681b0>)" instead of just "<function open at 0x7f03031681b0>". It is confusing. It will produce a lot of questions why open (and only open) is so special.
History
Date User Action Args
2021-04-09 07:49:13serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, mark.dickinson, vstinner, methane, Mark.Shannon
2021-04-09 07:49:13serhiy.storchakasetmessageid: <1617954553.47.0.0825960331593.issue43682@roundup.psfhosted.org>
2021-04-09 07:49:13serhiy.storchakalinkissue43682 messages
2021-04-09 07:49:12serhiy.storchakacreate