Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

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.

----------

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

Reply via email to