@@ -984,7 +984,7 @@ but does not affect the semantics.
984984
985985The primary must evaluate to a callable object (user-defined functions, built-in
986986functions, methods of built-in objects, class objects, methods of class
987- instances, and all objects having a :meth: `__call__ ` method are callable). All
987+ instances, and all objects having a :meth: `~object. __call__ ` method are callable). All
988988argument expressions are evaluated before the call is attempted. Please refer
989989to section :ref: `function ` for the syntax of formal :term: `parameter ` lists.
990990
@@ -1142,7 +1142,7 @@ a class instance:
11421142 pair: instance; call
11431143 single: __call__() (object method)
11441144
1145- The class must define a :meth: `__call__ ` method; the effect is then the same as
1145+ The class must define a :meth: `~object. __call__ ` method; the effect is then the same as
11461146 if that method was called.
11471147
11481148
@@ -1194,7 +1194,7 @@ Raising ``0.0`` to a negative power results in a :exc:`ZeroDivisionError`.
11941194Raising a negative number to a fractional power results in a :class: `complex `
11951195number. (In earlier versions it raised a :exc: `ValueError `.)
11961196
1197- This operation can be customized using the special :meth: `__pow__ ` method.
1197+ This operation can be customized using the special :meth: `~object. __pow__ ` method.
11981198
11991199.. _unary :
12001200
@@ -1217,15 +1217,15 @@ All unary arithmetic and bitwise operations have the same priority:
12171217 single: - (minus); unary operator
12181218
12191219The unary ``- `` (minus) operator yields the negation of its numeric argument; the
1220- operation can be overridden with the :meth: `__neg__ ` special method.
1220+ operation can be overridden with the :meth: `~object. __neg__ ` special method.
12211221
12221222.. index ::
12231223 single: plus
12241224 single: operator; + (plus)
12251225 single: + (plus); unary operator
12261226
12271227The unary ``+ `` (plus) operator yields its numeric argument unchanged; the
1228- operation can be overridden with the :meth: `__pos__ ` special method.
1228+ operation can be overridden with the :meth: `~object. __pos__ ` special method.
12291229
12301230.. index ::
12311231 single: inversion
@@ -1234,7 +1234,7 @@ operation can be overridden with the :meth:`__pos__` special method.
12341234The unary ``~ `` (invert) operator yields the bitwise inversion of its integer
12351235argument. The bitwise inversion of ``x `` is defined as ``-(x+1) ``. It only
12361236applies to integral numbers or to custom objects that override the
1237- :meth: `__invert__ ` special method.
1237+ :meth: `~object. __invert__ ` special method.
12381238
12391239
12401240
@@ -1272,8 +1272,8 @@ the other must be a sequence. In the former case, the numbers are converted to a
12721272common type and then multiplied together. In the latter case, sequence
12731273repetition is performed; a negative repetition factor yields an empty sequence.
12741274
1275- This operation can be customized using the special :meth: `__mul__ ` and
1276- :meth: `__rmul__ ` methods.
1275+ This operation can be customized using the special :meth: `~object. __mul__ ` and
1276+ :meth: `~object. __rmul__ ` methods.
12771277
12781278.. index ::
12791279 single: matrix multiplication
@@ -1297,8 +1297,8 @@ integer; the result is that of mathematical division with the 'floor' function
12971297applied to the result. Division by zero raises the :exc: `ZeroDivisionError `
12981298exception.
12991299
1300- This operation can be customized using the special :meth: `__truediv__ ` and
1301- :meth: `__floordiv__ ` methods.
1300+ This operation can be customized using the special :meth: `~object. __truediv__ ` and
1301+ :meth: `~object. __floordiv__ ` methods.
13021302
13031303.. index ::
13041304 single: modulo
@@ -1323,7 +1323,7 @@ also overloaded by string objects to perform old-style string formatting (also
13231323known as interpolation). The syntax for string formatting is described in the
13241324Python Library Reference, section :ref: `old-string-formatting `.
13251325
1326- The *modulo * operation can be customized using the special :meth: `__mod__ ` method.
1326+ The *modulo * operation can be customized using the special :meth: `~object. __mod__ ` method.
13271327
13281328The floor division operator, the modulo operator, and the :func: `divmod `
13291329function are not defined for complex numbers. Instead, convert to a floating
@@ -1339,8 +1339,8 @@ must either both be numbers or both be sequences of the same type. In the
13391339former case, the numbers are converted to a common type and then added together.
13401340In the latter case, the sequences are concatenated.
13411341
1342- This operation can be customized using the special :meth: `__add__ ` and
1343- :meth: `__radd__ ` methods.
1342+ This operation can be customized using the special :meth: `~object. __add__ ` and
1343+ :meth: `~object. __radd__ ` methods.
13441344
13451345.. index ::
13461346 single: subtraction
@@ -1350,7 +1350,7 @@ This operation can be customized using the special :meth:`__add__` and
13501350The ``- `` (subtraction) operator yields the difference of its arguments. The
13511351numeric arguments are first converted to a common type.
13521352
1353- This operation can be customized using the special :meth: `__sub__ ` method.
1353+ This operation can be customized using the special :meth: `~object. __sub__ ` method.
13541354
13551355
13561356.. _shifting :
@@ -1371,8 +1371,8 @@ The shifting operations have lower priority than the arithmetic operations:
13711371These operators accept integers as arguments. They shift the first argument to
13721372the left or right by the number of bits given by the second argument.
13731373
1374- This operation can be customized using the special :meth: `__lshift__ ` and
1375- :meth: `__rshift__ ` methods.
1374+ This operation can be customized using the special :meth: `~object. __lshift__ ` and
1375+ :meth: `~object. __rshift__ ` methods.
13761376
13771377.. index :: pair: exception; ValueError
13781378
@@ -1399,26 +1399,26 @@ Each of the three bitwise operations has a different priority level:
13991399 pair: operator; & (ampersand)
14001400
14011401The ``& `` operator yields the bitwise AND of its arguments, which must be
1402- integers or one of them must be a custom object overriding :meth: `__and__ ` or
1403- :meth: `__rand__ ` special methods.
1402+ integers or one of them must be a custom object overriding :meth: `~object. __and__ ` or
1403+ :meth: `~object. __rand__ ` special methods.
14041404
14051405.. index ::
14061406 pair: bitwise; xor
14071407 pair: exclusive; or
14081408 pair: operator; ^ (caret)
14091409
14101410The ``^ `` operator yields the bitwise XOR (exclusive OR) of its arguments, which
1411- must be integers or one of them must be a custom object overriding :meth: `__xor__ ` or
1412- :meth: `__rxor__ ` special methods.
1411+ must be integers or one of them must be a custom object overriding :meth: `~object. __xor__ ` or
1412+ :meth: `~object. __rxor__ ` special methods.
14131413
14141414.. index ::
14151415 pair: bitwise; or
14161416 pair: inclusive; or
14171417 pair: operator; | (vertical bar)
14181418
14191419The ``| `` operator yields the bitwise (inclusive) OR of its arguments, which
1420- must be integers or one of them must be a custom object overriding :meth: `__or__ ` or
1421- :meth: `__ror__ ` special methods.
1420+ must be integers or one of them must be a custom object overriding :meth: `~object. __or__ ` or
1421+ :meth: `~object. __ror__ ` special methods.
14221422
14231423
14241424.. _comparisons :
@@ -1485,7 +1485,7 @@ comparison implementation.
14851485Because all types are (direct or indirect) subtypes of :class: `object `, they
14861486inherit the default comparison behavior from :class: `object `. Types can
14871487customize their comparison behavior by implementing
1488- :dfn: `rich comparison methods ` like :meth: `__lt__ `, described in
1488+ :dfn: `rich comparison methods ` like :meth: `~object. __lt__ `, described in
14891489:ref: `customization `.
14901490
14911491The default behavior for equality comparison (``== `` and ``!= ``) is based on
@@ -1649,12 +1649,12 @@ substring of *y*. An equivalent test is ``y.find(x) != -1``. Empty strings are
16491649always considered to be a substring of any other string, so ``"" in "abc" `` will
16501650return ``True ``.
16511651
1652- For user-defined classes which define the :meth: `__contains__ ` method, ``x in
1652+ For user-defined classes which define the :meth: `~object. __contains__ ` method, ``x in
16531653y `` returns ``True `` if ``y.__contains__(x) `` returns a true value, and
16541654``False `` otherwise.
16551655
1656- For user-defined classes which do not define :meth: `__contains__ ` but do define
1657- :meth: `__iter__ `, ``x in y `` is ``True `` if some value ``z ``, for which the
1656+ For user-defined classes which do not define :meth: `~object. __contains__ ` but do define
1657+ :meth: `~object. __iter__ `, ``x in y `` is ``True `` if some value ``z ``, for which the
16581658expression ``x is z or x == z `` is true, is produced while iterating over ``y ``.
16591659If an exception is raised during the iteration, it is as if :keyword: `in ` raised
16601660that exception.
0 commit comments