@@ -454,6 +454,19 @@ Callable types
454454
455455 .. tabularcolumns :: |l|L|l|
456456
457+ .. index ::
458+ single: __doc__ (function attribute)
459+ single: __name__ (function attribute)
460+ single: __module__ (function attribute)
461+ single: __dict__ (function attribute)
462+ single: __defaults__ (function attribute)
463+ single: __closure__ (function attribute)
464+ single: __code__ (function attribute)
465+ single: __globals__ (function attribute)
466+ single: __annotations__ (function attribute)
467+ single: __kwdefaults__ (function attribute)
468+ pair: global; namespace
469+
457470 +-------------------------+-------------------------------+-----------+
458471 | Attribute | Meaning | |
459472 +=========================+===============================+===========+
@@ -462,10 +475,11 @@ Callable types
462475 | | unavailable; not inherited by | |
463476 | | subclasses | |
464477 +-------------------------+-------------------------------+-----------+
465- | :attr: `__name__ ` | The function's name | Writable |
478+ | :attr: `~definition.\ | The function's name | Writable |
479+ | __name__` | | |
466480 +-------------------------+-------------------------------+-----------+
467- | :attr: `__qualname__ ` | The function's | Writable |
468- | | :term: `qualified name ` | |
481+ | :attr: `~definition. \ | The function's | Writable |
482+ | __qualname__` | :term: `qualified name ` | |
469483 | | | |
470484 | | .. versionadded:: 3.3 | |
471485 +-------------------------+-------------------------------+-----------+
@@ -489,7 +503,7 @@ Callable types
489503 | | module in which the function | |
490504 | | was defined. | |
491505 +-------------------------+-------------------------------+-----------+
492- | :attr: `__dict__ ` | The namespace supporting | Writable |
506+ | :attr: `~object. __dict__`| The namespace supporting | Writable |
493507 | | arbitrary function | |
494508 | | attributes. | |
495509 +-------------------------+-------------------------------+-----------+
@@ -519,19 +533,6 @@ Callable types
519533 Additional information about a function's definition can be retrieved from its
520534 code object; see the description of internal types below.
521535
522- .. index ::
523- single: __doc__ (function attribute)
524- single: __name__ (function attribute)
525- single: __module__ (function attribute)
526- single: __dict__ (function attribute)
527- single: __defaults__ (function attribute)
528- single: __closure__ (function attribute)
529- single: __code__ (function attribute)
530- single: __globals__ (function attribute)
531- single: __annotations__ (function attribute)
532- single: __kwdefaults__ (function attribute)
533- pair: global; namespace
534-
535536 Instance methods
536537 .. index ::
537538 object: method
@@ -550,7 +551,7 @@ Callable types
550551
551552 Special read-only attributes: :attr: `__self__ ` is the class instance object,
552553 :attr: `__func__ ` is the function object; :attr: `__doc__ ` is the method's
553- documentation (same as ``__func__.__doc__ ``); :attr: `__name__ ` is the
554+ documentation (same as ``__func__.__doc__ ``); :attr: `~definition. __name__ ` is the
554555 method name (same as ``__func__.__name__ ``); :attr: `__module__ ` is the
555556 name of the module the method was defined in, or ``None `` if unavailable.
556557
@@ -637,7 +638,7 @@ Callable types
637638 standard built-in module). The number and type of the arguments are
638639 determined by the C function. Special read-only attributes:
639640 :attr: `__doc__ ` is the function's documentation string, or ``None `` if
640- unavailable; :attr: `__name__ ` is the function's name; :attr: `__self__ ` is
641+ unavailable; :attr: `~definition. __name__ ` is the function's name; :attr: `__self__ ` is
641642 set to ``None `` (but see the next item); :attr: `__module__ ` is the name of
642643 the module the function was defined in or ``None `` if unavailable.
643644
@@ -687,7 +688,7 @@ Modules
687688
688689 .. index :: single: __dict__ (module attribute)
689690
690- Special read-only attribute: :attr: `__dict__ ` is the module's namespace as a
691+ Special read-only attribute: :attr: `~object. __dict__ ` is the module's namespace as a
691692 dictionary object.
692693
693694 .. impl-detail ::
@@ -743,7 +744,7 @@ Custom classes
743744 method object, it is transformed into the object wrapped by the static method
744745 object. See section :ref: `descriptors ` for another way in which attributes
745746 retrieved from a class may differ from those actually contained in its
746- :attr: `__dict__ `.
747+ :attr: `~object. __dict__ `.
747748
748749 .. index :: triple: class; attribute; assignment
749750
@@ -761,8 +762,8 @@ Custom classes
761762 single: __bases__ (class attribute)
762763 single: __doc__ (class attribute)
763764
764- Special attributes: :attr: `__name__ ` is the class name; :attr: `__module__ ` is
765- the module name in which the class was defined; :attr: `__dict__ ` is the
765+ Special attributes: :attr: `~definition. __name__ ` is the class name; :attr: `__module__ ` is
766+ the module name in which the class was defined; :attr: `~object. __dict__ ` is the
766767 dictionary containing the class's namespace; :attr: `~class.__bases__ ` is a
767768 tuple (possibly empty or a singleton) containing the base classes, in the
768769 order of their occurrence in the base class list; :attr: `__doc__ ` is the
@@ -785,7 +786,7 @@ Class instances
785786 class method objects are also transformed; see above under "Classes". See
786787 section :ref: `descriptors ` for another way in which attributes of a class
787788 retrieved via its instances may differ from the objects actually stored in
788- the class's :attr: `__dict__ `. If no class attribute is found, and the
789+ the class's :attr: `~object. __dict__ `. If no class attribute is found, and the
789790 object's class has a :meth: `__getattr__ ` method, that is called to satisfy
790791 the lookup.
791792
@@ -1466,7 +1467,7 @@ method (a so-called *descriptor* class) appears in an *owner* class (the
14661467descriptor must be in either the owner's class dictionary or in the class
14671468dictionary for one of its parents). In the examples below, "the attribute"
14681469refers to the attribute whose name is the key of the property in the owner
1469- class' :attr: `__dict__ `.
1470+ class' :attr: `~object. __dict__ `.
14701471
14711472
14721473.. method :: object.__get__(self, instance, owner)
0 commit comments