[Python-checkins] cpython: Fix indentation.

georg.brandl python-checkins at python.org
Sat Mar 24 08:12:42 CET 2012


http://hg.python.org/cpython/rev/1b4f18b68a6f
changeset:   75910:1b4f18b68a6f
user:        Georg Brandl <georg at python.org>
date:        Sat Mar 24 08:12:41 2012 +0100
summary:
  Fix indentation.

files:
  Doc/library/stdtypes.rst |  48 ++++++++++++++--------------
  1 files changed, 24 insertions(+), 24 deletions(-)


diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -645,30 +645,30 @@
 
 Here are the rules in detail:
 
- - If ``x = m / n`` is a nonnegative rational number and ``n`` is not divisible
-   by ``P``, define ``hash(x)`` as ``m * invmod(n, P) % P``, where ``invmod(n,
-   P)`` gives the inverse of ``n`` modulo ``P``.
-
- - If ``x = m / n`` is a nonnegative rational number and ``n`` is
-   divisible by ``P`` (but ``m`` is not) then ``n`` has no inverse
-   modulo ``P`` and the rule above doesn't apply; in this case define
-   ``hash(x)`` to be the constant value ``sys.hash_info.inf``.
-
- - If ``x = m / n`` is a negative rational number define ``hash(x)``
-   as ``-hash(-x)``.  If the resulting hash is ``-1``, replace it with
-   ``-2``.
-
- - The particular values ``sys.hash_info.inf``, ``-sys.hash_info.inf``
-   and ``sys.hash_info.nan`` are used as hash values for positive
-   infinity, negative infinity, or nans (respectively).  (All hashable
-   nans have the same hash value.)
-
- - For a :class:`complex` number ``z``, the hash values of the real
-   and imaginary parts are combined by computing ``hash(z.real) +
-   sys.hash_info.imag * hash(z.imag)``, reduced modulo
-   ``2**sys.hash_info.width`` so that it lies in
-   ``range(-2**(sys.hash_info.width - 1), 2**(sys.hash_info.width -
-   1))``.  Again, if the result is ``-1``, it's replaced with ``-2``.
+- If ``x = m / n`` is a nonnegative rational number and ``n`` is not divisible
+  by ``P``, define ``hash(x)`` as ``m * invmod(n, P) % P``, where ``invmod(n,
+  P)`` gives the inverse of ``n`` modulo ``P``.
+
+- If ``x = m / n`` is a nonnegative rational number and ``n`` is
+  divisible by ``P`` (but ``m`` is not) then ``n`` has no inverse
+  modulo ``P`` and the rule above doesn't apply; in this case define
+  ``hash(x)`` to be the constant value ``sys.hash_info.inf``.
+
+- If ``x = m / n`` is a negative rational number define ``hash(x)``
+  as ``-hash(-x)``.  If the resulting hash is ``-1``, replace it with
+  ``-2``.
+
+- The particular values ``sys.hash_info.inf``, ``-sys.hash_info.inf``
+  and ``sys.hash_info.nan`` are used as hash values for positive
+  infinity, negative infinity, or nans (respectively).  (All hashable
+  nans have the same hash value.)
+
+- For a :class:`complex` number ``z``, the hash values of the real
+  and imaginary parts are combined by computing ``hash(z.real) +
+  sys.hash_info.imag * hash(z.imag)``, reduced modulo
+  ``2**sys.hash_info.width`` so that it lies in
+  ``range(-2**(sys.hash_info.width - 1), 2**(sys.hash_info.width -
+  1))``.  Again, if the result is ``-1``, it's replaced with ``-2``.
 
 
 To clarify the above rules, here's some example Python code,

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list