]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix numbers.Real.__rdivmod__ doc string (#31991)
authorGéry Ogam <gery.ogam@gmail.com>
Fri, 13 May 2022 14:49:36 +0000 (16:49 +0200)
committerGitHub <noreply@github.com>
Fri, 13 May 2022 14:49:36 +0000 (09:49 -0500)
Lib/numbers.py

index 9548aebd776a7c430478a420d32d26e5bc6a8c49..8e37d79fa755ad31caac97cd343c89d9dc3d8e5b 100644 (file)
@@ -143,7 +143,7 @@ class Complex(Number):
 
     @abstractmethod
     def __pow__(self, exponent):
-        """self**exponent; should promote to float or complex when necessary."""
+        """self ** exponent; should promote to float or complex when necessary."""
         raise NotImplementedError
 
     @abstractmethod
@@ -192,7 +192,7 @@ class Real(Complex):
         """trunc(self): Truncates self to an Integral.
 
         Returns an Integral i such that:
-          * i>0 iff self>0;
+          * i > 0 iff self > 0;
           * abs(i) <= abs(self);
           * for any Integral j satisfying the first two conditions,
             abs(i) >= abs(j) [i.e. i has "maximal" abs among those].
@@ -228,7 +228,7 @@ class Real(Complex):
         return (self // other, self % other)
 
     def __rdivmod__(self, other):
-        """divmod(other, self): The pair (self // other, self % other).
+        """divmod(other, self): The pair (other // self, other % self).
 
         Sometimes this can be computed faster than the pair of
         operations.