Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(158427)

Unified Diff: Doc/library/inspect.rst

Issue 18929: inspect.classify_class_attrs ignores metaclass
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Lib/inspect.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/library/inspect.rst Mon Sep 09 21:12:21 2013 +0900
+++ b/Doc/library/inspect.rst Mon Sep 09 19:51:58 2013 -0700
@@ -166,22 +166,23 @@ attributes:
.. function:: getmembers(object[, predicate])
Return all the members of an object in a list of (name, value) pairs sorted by
name. If the optional *predicate* argument is supplied, only members for which
the predicate returns a true value are included.
.. 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)
Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode, module_type)``
of values that describe how Python will interpret the file identified by
*path* if it is a module, or ``None`` if it would not be identified as a
module. In that tuple, *name* is the name of the module without the name of
any enclosing package, *suffix* is the trailing part of the file name (which
may not be a dot-delimited extension), *mode* is the :func:`open` mode that
« no previous file with comments | « no previous file | Lib/inspect.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+