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

Delta Between Two Patch Sets: Doc/library/inspect.rst

Issue 18929: inspect.classify_class_attrs ignores metaclass
Left Patch Set: Created 6 years, 3 months ago
Right Patch Set: Created 6 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Lib/inspect.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 :mod:`inspect` --- Inspect live objects 1 :mod:`inspect` --- Inspect live objects
2 ======================================= 2 =======================================
3 3
4 .. module:: inspect 4 .. module:: inspect
5 :synopsis: Extract information and source code from live objects. 5 :synopsis: Extract information and source code from live objects.
6 .. moduleauthor:: Ka-Ping Yee <ping@lfw.org> 6 .. moduleauthor:: Ka-Ping Yee <ping@lfw.org>
7 .. sectionauthor:: Ka-Ping Yee <ping@lfw.org> 7 .. sectionauthor:: Ka-Ping Yee <ping@lfw.org>
8 8
9 **Source code:** :source:`Lib/inspect.py` 9 **Source code:** :source:`Lib/inspect.py`
10 10
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 166
167 167
168 .. function:: getmembers(object[, predicate]) 168 .. function:: getmembers(object[, predicate])
169 169
170 Return all the members of an object in a list of (name, value) pairs sorted b y 170 Return all the members of an object in a list of (name, value) pairs sorted b y
171 name. If the optional *predicate* argument is supplied, only members for whi ch 171 name. If the optional *predicate* argument is supplied, only members for whi ch
172 the predicate returns a true value are included. 172 the predicate returns a true value are included.
173 173
174 .. note:: 174 .. note::
175 175
176 :func:`getmembers` does not return metaclass attributes when the argument 176 :func:`getmembers` will only return metaclass attributes when the
177 is a class (this behavior is inherited from the :func:`dir` function). 177 argument is a class and those attributes have been listed in a custom
178 :meth:`__dir__`.
178 179
179 180
180 .. function:: getmoduleinfo(path) 181 .. function:: getmoduleinfo(path)
181 182
182 Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode, module_type)`` 183 Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode, module_type)``
183 of values that describe how Python will interpret the file identified by 184 of values that describe how Python will interpret the file identified by
184 *path* if it is a module, or ``None`` if it would not be identified as a 185 *path* if it is a module, or ``None`` if it would not be identified as a
185 module. In that tuple, *name* is the name of the module without the name of 186 module. In that tuple, *name* is the name of the module without the name of
186 any enclosing package, *suffix* is the trailing part of the file name (which 187 any enclosing package, *suffix* is the trailing part of the file name (which
187 may not be a dot-delimited extension), *mode* is the :func:`open` mode that 188 may not be a dot-delimited extension), *mode* is the :func:`open` mode that
(...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 *generator* is not a Python generator object. 999 *generator* is not a Python generator object.
999 1000
1000 .. impl-detail:: 1001 .. impl-detail::
1001 1002
1002 This function relies on the generator exposing a Python stack frame 1003 This function relies on the generator exposing a Python stack frame
1003 for introspection, which isn't guaranteed to be the case in all 1004 for introspection, which isn't guaranteed to be the case in all
1004 implementations of Python. In such cases, this function will always 1005 implementations of Python. In such cases, this function will always
1005 return an empty dictionary. 1006 return an empty dictionary.
1006 1007
1007 .. versionadded:: 3.3 1008 .. versionadded:: 3.3
LEFTRIGHT
« no previous file | Lib/inspect.py » ('j') | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

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