From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 25 Nov 2022 22:06:45 +0000 (-0800) Subject: gh-64019: Have attribute table in `inspect` docs link to module attributes instead... X-Git-Tag: v3.11.1~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5fa17bef5b37522c530998d3fc2fd4aecef0202;p=thirdparty%2FPython%2Fcpython.git gh-64019: Have attribute table in `inspect` docs link to module attributes instead of listing them (GH-98116) (cherry picked from commit 7d2dcc53d09fe903329926bf7bbfe460b1465dab) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com> Co-authored-by: Michael Anckaert --- diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 44f1ae04c9e3..9cb7a6f94e49 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -32,7 +32,7 @@ The :func:`getmembers` function retrieves the members of an object such as a class or module. The functions whose names begin with "is" are mainly provided as convenient choices for the second argument to :func:`getmembers`. They also help you determine when you can expect to find the following special -attributes: +attributes (see :ref:`import-mod-attrs` for module attributes): .. this function name is too big to fit in the ascii-art table below .. |coroutine-origin-link| replace:: :func:`sys.set_coroutine_origin_tracking_depth` @@ -40,11 +40,6 @@ attributes: +-----------+-------------------+---------------------------+ | Type | Attribute | Description | +===========+===================+===========================+ -| module | __doc__ | documentation string | -+-----------+-------------------+---------------------------+ -| | __file__ | filename (missing for | -| | | built-in modules) | -+-----------+-------------------+---------------------------+ | class | __doc__ | documentation string | +-----------+-------------------+---------------------------+ | | __name__ | name with which this |