mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
bpo-43682: Make staticmethod objects callable (GH-25117)
Static methods (@staticmethod) are now callable as regular functions.
This commit is contained in:
parent
53114ffef1
commit
553ee2781a
7 changed files with 32 additions and 14 deletions
|
|
@ -1132,9 +1132,8 @@ Internal types
|
|||
around any other object, usually a user-defined method object. When a static
|
||||
method object is retrieved from a class or a class instance, the object actually
|
||||
returned is the wrapped object, which is not subject to any further
|
||||
transformation. Static method objects are not themselves callable, although the
|
||||
objects they wrap usually are. Static method objects are created by the built-in
|
||||
:func:`staticmethod` constructor.
|
||||
transformation. Static method objects are also callable. Static method
|
||||
objects are created by the built-in :func:`staticmethod` constructor.
|
||||
|
||||
Class method objects
|
||||
A class method object, like a static method object, is a wrapper around another
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue