mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Close #18929: inspect.classify_class_attrs will now search the metaclasses (last) to find where an attr was defined.
This commit is contained in:
parent
2131a4a2fc
commit
668dede7e9
2 changed files with 9 additions and 3 deletions
|
@ -173,8 +173,9 @@ attributes:
|
|||
|
||||
.. note::
|
||||
|
||||
:func:`getmembers` does not return metaclass attributes when the argument
|
||||
is a class (this behavior is inherited from the :func:`dir` function).
|
||||
:func:`getmembers` will only return metaclass attributes when the
|
||||
argument is a class and those attributes have been listed in a custom
|
||||
:meth:`__dir__`.
|
||||
|
||||
|
||||
.. function:: getmoduleinfo(path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue