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

Side by Side Diff: Doc/library/inspect.rst

Issue 18758: Fix internal references in the documentation
Patch Set: Created 6 years, 5 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:
View unified diff | Download patch
« no previous file with comments | « Doc/library/importlib.rst ('k') | Doc/library/io.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 921
922 Retrieve attributes without triggering dynamic lookup via the 922 Retrieve attributes without triggering dynamic lookup via the
923 descriptor protocol, :meth:`__getattr__` or :meth:`__getattribute__`. 923 descriptor protocol, :meth:`__getattr__` or :meth:`__getattribute__`.
924 924
925 Note: this function may not be able to retrieve all attributes 925 Note: this function may not be able to retrieve all attributes
926 that getattr can fetch (like dynamically created attributes) 926 that getattr can fetch (like dynamically created attributes)
927 and may find attributes that getattr can't (like descriptors 927 and may find attributes that getattr can't (like descriptors
928 that raise AttributeError). It can also return descriptors objects 928 that raise AttributeError). It can also return descriptors objects
929 instead of instance members. 929 instead of instance members.
930 930
931 If the instance :attr:`__dict__` is shadowed by another member (for example a 931 If the instance :attr:`~object.__dict__` is shadowed by another member (for e xample a
932 property) then this function will be unable to find instance members. 932 property) then this function will be unable to find instance members.
933 933
934 .. versionadded:: 3.2 934 .. versionadded:: 3.2
935 935
936 :func:`getattr_static` does not resolve descriptors, for example slot descriptor s or 936 :func:`getattr_static` does not resolve descriptors, for example slot descriptor s or
937 getset descriptors on objects implemented in C. The descriptor object 937 getset descriptors on objects implemented in C. The descriptor object
938 is returned instead of the underlying attribute. 938 is returned instead of the underlying attribute.
939 939
940 You can handle these with code like the following. Note that 940 You can handle these with code like the following. Note that
941 for arbitrary getset descriptors invoking these may trigger 941 for arbitrary getset descriptors invoking these may trigger
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 1016
1017 .. program:: inspect 1017 .. program:: inspect
1018 1018
1019 By default, accepts the name of a module and prints the source of that 1019 By default, accepts the name of a module and prints the source of that
1020 module. A class or function within the module can be printed instead by 1020 module. A class or function within the module can be printed instead by
1021 appended a colon and the qualified name of the target object. 1021 appended a colon and the qualified name of the target object.
1022 1022
1023 .. cmdoption:: --details 1023 .. cmdoption:: --details
1024 1024
1025 Print information about the specified object rather than the source code 1025 Print information about the specified object rather than the source code
OLDNEW
« no previous file with comments | « Doc/library/importlib.rst ('k') | Doc/library/io.rst » ('j') | no next file with comments »

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