@@ -273,7 +273,7 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
273273
274274 :func: `getmembers ` will only return class attributes defined in the
275275 metaclass when the argument is a class and those attributes have been
276- listed in the metaclass' custom :meth: `__dir__ `.
276+ listed in the metaclass' custom :meth: `~object. __dir__ `.
277277
278278
279279.. function :: getmembers_static(object[, predicate])
@@ -487,12 +487,13 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
487487 has a :meth: `~object.__get__ ` method but not a :meth: `~object.__set__ `
488488 method, but beyond that the set of attributes varies. A
489489 :attr: `~definition.__name__ ` attribute is usually
490- sensible, and :attr: `__doc__ ` often is.
490+ sensible, and :attr: `! __doc__ ` often is.
491491
492492 Methods implemented via descriptors that also pass one of the other tests
493493 return ``False `` from the :func: `ismethoddescriptor ` test, simply because the
494494 other tests promise more -- you can, e.g., count on having the
495- :attr: `__func__ ` attribute (etc) when an object passes :func: `ismethod `.
495+ :ref: `__func__ <instance-methods >` attribute (etc) when an object passes
496+ :func: `ismethod `.
496497
497498
498499.. function :: isdatadescriptor(object)
@@ -503,7 +504,7 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
503504 Examples are properties (defined in Python), getsets, and members. The
504505 latter two are defined in C and there are more specific tests available for
505506 those types, which is robust across Python implementations. Typically, data
506- descriptors will also have :attr: `~definition.__name__ ` and :attr: `__doc__ ` attributes
507+ descriptors will also have :attr: `~definition.__name__ ` and :attr: `! __doc__ ` attributes
507508 (properties, getsets, and members have both of these attributes), but this is
508509 not guaranteed.
509510
@@ -1423,7 +1424,8 @@ Fetching attributes statically
14231424
14241425Both :func: `getattr ` and :func: `hasattr ` can trigger code execution when
14251426fetching or checking for the existence of attributes. Descriptors, like
1426- properties, will be invoked and :meth: `__getattr__ ` and :meth: `__getattribute__ `
1427+ properties, will be invoked and :meth: `~object.__getattr__ ` and
1428+ :meth: `~object.__getattribute__ `
14271429may be called.
14281430
14291431For cases where you want passive introspection, like documentation tools, this
@@ -1433,7 +1435,8 @@ but avoids executing code when it fetches attributes.
14331435.. function :: getattr_static(obj, attr, default=None)
14341436
14351437 Retrieve attributes without triggering dynamic lookup via the
1436- descriptor protocol, :meth: `__getattr__ ` or :meth: `__getattribute__ `.
1438+ descriptor protocol, :meth: `~object.__getattr__ `
1439+ or :meth: `~object.__getattribute__ `.
14371440
14381441 Note: this function may not be able to retrieve all attributes
14391442 that getattr can fetch (like dynamically created attributes)
0 commit comments