@@ -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
@@ -707,7 +707,7 @@ are always available. They are listed here in alphabetical order.
707707
708708 One useful application of the second form of :func: `iter ` is to read lines of
709709 a file until a certain line is reached. The following example reads a file
710- until the :meth: `readline ` method returns an empty string::
710+ until the :meth: `~io.TextIOBase. readline ` method returns an empty string::
711711
712712 with open('mydata.txt') as fp:
713713 for line in iter(fp.readline, ''):
@@ -810,8 +810,8 @@ are always available. They are listed here in alphabetical order.
810810
811811 .. note ::
812812
813- :class: `object ` does *not * have a :attr: `__dict__ `, so you can't assign
814- arbitrary attributes to an instance of the :class: `object ` class.
813+ :class: `object ` does *not * have a :attr: `~object. __dict__ `, so you can't
814+ assign arbitrary attributes to an instance of the :class: `object ` class.
815815
816816
817817.. function :: oct(x)
@@ -889,9 +889,9 @@ are always available. They are listed here in alphabetical order.
889889 size" and falling back on :attr: `io.DEFAULT_BUFFER_SIZE `. On many systems,
890890 the buffer will typically be 4096 or 8192 bytes long.
891891
892- * "Interactive" text files (files for which :meth: `isatty ` returns True) use
893- line buffering. Other text files use the policy described above for binary
894- files.
892+ * "Interactive" text files (files for which :meth: `~io.IOBase. isatty `
893+ returns True) use line buffering. Other text files use the policy
894+ described above for binary files.
895895
896896 *encoding * is the name of the encoding used to decode or encode the file.
897897 This should only be used in text mode. The default encoding is platform
@@ -1096,10 +1096,10 @@ are always available. They are listed here in alphabetical order.
10961096 turns the :meth: `voltage ` method into a "getter" for a read-only attribute
10971097 with the same name.
10981098
1099- A property object has :attr: `getter `, :attr: `setter `, and :attr: ` deleter `
1100- methods usable as decorators that create a copy of the property with the
1101- corresponding accessor function set to the decorated function. This is
1102- best explained with an example::
1099+ A property object has :attr: `~property. getter `, :attr: `~property. setter `,
1100+ and :attr: ` ~property.deleter ` methods usable as decorators that create a
1101+ copy of the property with the corresponding accessor function set to the
1102+ decorated function. This is best explained with an example::
11031103
11041104 class C:
11051105 def __init__(self):
@@ -1205,13 +1205,13 @@ are always available. They are listed here in alphabetical order.
12051205
12061206 Return a :term: `slice ` object representing the set of indices specified by
12071207 ``range(start, stop, step) ``. The *start * and *step * arguments default to
1208- ``None ``. Slice objects have read-only data attributes :attr: `start `,
1209- :attr: `stop ` and :attr: `step ` which merely return the argument values (or their
1210- default). They have no other explicit functionality; however they are used by
1211- Numerical Python and other third party extensions. Slice objects are also
1212- generated when extended indexing syntax is used. For example:
1213- ``a[start:stop:step] `` or ``a[start:stop, i] ``. See :func: ` itertools.islice `
1214- for an alternate version that returns an iterator.
1208+ ``None ``. Slice objects have read-only data attributes :attr: `~slice. start `,
1209+ :attr: `~slice. stop ` and :attr: `~slice. step ` which merely return the argument
1210+ values (or their default). They have no other explicit functionality;
1211+ however they are used by Numerical Python and other third party extensions.
1212+ Slice objects are also generated when extended indexing syntax is used. For
1213+ example: ``a[start:stop:step] `` or ``a[start:stop, i] ``. See
1214+ :func: ` itertools.islice ` for an alternate version that returns an iterator.
12151215
12161216
12171217.. function :: sorted(iterable[, key][, reverse])
@@ -1291,9 +1291,10 @@ are always available. They are listed here in alphabetical order.
12911291 been overridden in a class. The search order is same as that used by
12921292 :func: `getattr ` except that the *type * itself is skipped.
12931293
1294- The :attr: `__mro__ ` attribute of the *type * lists the method resolution
1295- search order used by both :func: `getattr ` and :func: `super `. The attribute
1296- is dynamic and can change whenever the inheritance hierarchy is updated.
1294+ The :attr: `~class.__mro__ ` attribute of the *type * lists the method
1295+ resolution search order used by both :func: `getattr ` and :func: `super `. The
1296+ attribute is dynamic and can change whenever the inheritance hierarchy is
1297+ updated.
12971298
12981299 If the second argument is omitted, the super object returned is unbound. If
12991300 the second argument is an object, ``isinstance(obj, type) `` must be true. If
@@ -1356,19 +1357,20 @@ are always available. They are listed here in alphabetical order.
13561357
13571358
13581359 With one argument, return the type of an *object *. The return value is a
1359- type object and generally the same object as returned by ``object.__class__ ``.
1360+ type object and generally the same object as returned by
1361+ :attr: `object.__class__ <instance.__class__> `.
13601362
13611363 The :func: `isinstance ` built-in function is recommended for testing the type
13621364 of an object, because it takes subclasses into account.
13631365
13641366
13651367 With three arguments, return a new type object. This is essentially a
13661368 dynamic form of the :keyword: `class ` statement. The *name * string is the
1367- class name and becomes the :attr: `__name__ ` attribute; the *bases * tuple
1368- itemizes the base classes and becomes the :attr: `__bases__ ` attribute;
1369- and the *dict * dictionary is the namespace containing definitions for class
1370- body and becomes the :attr: `__dict__ ` attribute. For example, the
1371- following two statements create identical :class: `type ` objects:
1369+ class name and becomes the :attr: `~class. __name__ ` attribute; the *bases *
1370+ tuple itemizes the base classes and becomes the :attr: `~class. __bases__ `
1371+ attribute; and the *dict * dictionary is the namespace containing definitions
1372+ for class body and becomes the :attr: `~object. __dict__ ` attribute. For
1373+ example, the following two statements create identical :class: `type ` objects:
13721374
13731375 >>> class X :
13741376 ... a = 1
@@ -1380,7 +1382,7 @@ are always available. They are listed here in alphabetical order.
13801382
13811383.. function :: vars([object])
13821384
1383- Return the :attr: `__dict__ ` attribute for a module, class, instance,
1385+ Return the :attr: `~object. __dict__ ` attribute for a module, class, instance,
13841386 or any other object with a :attr: `__dict__ ` attribute.
13851387
13861388 Objects such as modules and instances have an updateable :attr: `__dict__ `
0 commit comments