@@ -219,8 +219,8 @@ are always available. They are listed here in alphabetical order.
219219
220220 Future statements are specified by bits which can be bitwise ORed together to
221221 specify multiple statements. The bitfield required to specify a given feature
222- can be found as the :attr: `compiler_flag ` attribute on the :class: ` _Feature `
223- instance in the :mod: `__future__ ` module.
222+ can be found as the :attr: `~__future__._Feature. compiler_flag ` attribute on
223+ the :class: ` ~__future__._Feature ` instance in the :mod: `__future__ ` module.
224224
225225 The argument *optimize * specifies the optimization level of the compiler; the
226226 default value of ``-1 `` selects the optimization level of the interpreter as
@@ -717,7 +717,7 @@ are always available. They are listed here in alphabetical order.
717717
718718 One useful application of the second form of :func: `iter ` is to read lines of
719719 a file until a certain line is reached. The following example reads a file
720- until the :meth: `readline ` method returns an empty string::
720+ until the :meth: `~io.TextIOBase. readline ` method returns an empty string::
721721
722722 with open('mydata.txt') as fp:
723723 for line in iter(fp.readline, ''):
@@ -826,8 +826,8 @@ are always available. They are listed here in alphabetical order.
826826
827827 .. note ::
828828
829- :class: `object ` does *not * have a :attr: `__dict__ `, so you can't assign
830- arbitrary attributes to an instance of the :class: `object ` class.
829+ :class: `object ` does *not * have a :attr: `~object. __dict__ `, so you can't
830+ assign arbitrary attributes to an instance of the :class: `object ` class.
831831
832832
833833.. function :: oct(x)
@@ -905,9 +905,9 @@ are always available. They are listed here in alphabetical order.
905905 size" and falling back on :attr: `io.DEFAULT_BUFFER_SIZE `. On many systems,
906906 the buffer will typically be 4096 or 8192 bytes long.
907907
908- * "Interactive" text files (files for which :meth: `isatty ` returns True) use
909- line buffering. Other text files use the policy described above for binary
910- files.
908+ * "Interactive" text files (files for which :meth: `~io.IOBase. isatty `
909+ returns True) use line buffering. Other text files use the policy
910+ described above for binary files.
911911
912912 *encoding * is the name of the encoding used to decode or encode the file.
913913 This should only be used in text mode. The default encoding is platform
@@ -1115,10 +1115,10 @@ are always available. They are listed here in alphabetical order.
11151115 turns the :meth: `voltage ` method into a "getter" for a read-only attribute
11161116 with the same name.
11171117
1118- A property object has :attr: `getter `, :attr: `setter `, and :attr: ` deleter `
1119- methods usable as decorators that create a copy of the property with the
1120- corresponding accessor function set to the decorated function. This is
1121- best explained with an example::
1118+ A property object has :attr: `~property. getter `, :attr: `~property. setter `,
1119+ and :attr: ` ~property.deleter ` methods usable as decorators that create a
1120+ copy of the property with the corresponding accessor function set to the
1121+ decorated function. This is best explained with an example::
11221122
11231123 class C:
11241124 def __init__(self):
@@ -1224,13 +1224,13 @@ are always available. They are listed here in alphabetical order.
12241224
12251225 Return a :term: `slice ` object representing the set of indices specified by
12261226 ``range(start, stop, step) ``. The *start * and *step * arguments default to
1227- ``None ``. Slice objects have read-only data attributes :attr: `start `,
1228- :attr: `stop ` and :attr: `step ` which merely return the argument values (or their
1229- default). They have no other explicit functionality; however they are used by
1230- Numerical Python and other third party extensions. Slice objects are also
1231- generated when extended indexing syntax is used. For example:
1232- ``a[start:stop:step] `` or ``a[start:stop, i] ``. See :func: ` itertools.islice `
1233- for an alternate version that returns an iterator.
1227+ ``None ``. Slice objects have read-only data attributes :attr: `~slice. start `,
1228+ :attr: `~slice. stop ` and :attr: `~slice. step ` which merely return the argument
1229+ values (or their default). They have no other explicit functionality;
1230+ however they are used by Numerical Python and other third party extensions.
1231+ Slice objects are also generated when extended indexing syntax is used. For
1232+ example: ``a[start:stop:step] `` or ``a[start:stop, i] ``. See
1233+ :func: ` itertools.islice ` for an alternate version that returns an iterator.
12341234
12351235
12361236.. function :: sorted(iterable[, key][, reverse])
@@ -1310,9 +1310,10 @@ are always available. They are listed here in alphabetical order.
13101310 been overridden in a class. The search order is same as that used by
13111311 :func: `getattr ` except that the *type * itself is skipped.
13121312
1313- The :attr: `__mro__ ` attribute of the *type * lists the method resolution
1314- search order used by both :func: `getattr ` and :func: `super `. The attribute
1315- is dynamic and can change whenever the inheritance hierarchy is updated.
1313+ The :attr: `~class.__mro__ ` attribute of the *type * lists the method
1314+ resolution search order used by both :func: `getattr ` and :func: `super `. The
1315+ attribute is dynamic and can change whenever the inheritance hierarchy is
1316+ updated.
13161317
13171318 If the second argument is omitted, the super object returned is unbound. If
13181319 the second argument is an object, ``isinstance(obj, type) `` must be true. If
@@ -1375,19 +1376,20 @@ are always available. They are listed here in alphabetical order.
13751376
13761377
13771378 With one argument, return the type of an *object *. The return value is a
1378- type object and generally the same object as returned by ``object.__class__ ``.
1379+ type object and generally the same object as returned by
1380+ :attr: `object.__class__ <instance.__class__> `.
13791381
13801382 The :func: `isinstance ` built-in function is recommended for testing the type
13811383 of an object, because it takes subclasses into account.
13821384
13831385
13841386 With three arguments, return a new type object. This is essentially a
13851387 dynamic form of the :keyword: `class ` statement. The *name * string is the
1386- class name and becomes the :attr: `__name__ ` attribute; the *bases * tuple
1387- itemizes the base classes and becomes the :attr: `__bases__ ` attribute;
1388- and the *dict * dictionary is the namespace containing definitions for class
1389- body and becomes the :attr: `__dict__ ` attribute. For example, the
1390- following two statements create identical :class: `type ` objects:
1388+ class name and becomes the :attr: `~class. __name__ ` attribute; the *bases *
1389+ tuple itemizes the base classes and becomes the :attr: `~class. __bases__ `
1390+ attribute; and the *dict * dictionary is the namespace containing definitions
1391+ for class body and becomes the :attr: `~object. __dict__ ` attribute. For
1392+ example, the following two statements create identical :class: `type ` objects:
13911393
13921394 >>> class X :
13931395 ... a = 1
@@ -1399,7 +1401,7 @@ are always available. They are listed here in alphabetical order.
13991401
14001402.. function :: vars([object])
14011403
1402- Return the :attr: `__dict__ ` attribute for a module, class, instance,
1404+ Return the :attr: `~object. __dict__ ` attribute for a module, class, instance,
14031405 or any other object with a :attr: `__dict__ ` attribute.
14041406
14051407 Objects such as modules and instances have an updateable :attr: `__dict__ `
0 commit comments