[Python-checkins] Fix numbers.Real.__rdivmod__ doc string (#31991)
rhettinger
webhook-mailer at python.org
Fri May 13 10:49:41 EDT 2022
https://github.com/python/cpython/commit/7e46ae33bd522cf8331052c3c8835f9366599d8d
commit: 7e46ae33bd522cf8331052c3c8835f9366599d8d
branch: main
author: Géry Ogam <gery.ogam at gmail.com>
committer: rhettinger <rhettinger at users.noreply.github.com>
date: 2022-05-13T09:49:36-05:00
summary:
Fix numbers.Real.__rdivmod__ doc string (#31991)
files:
M Lib/numbers.py
diff --git a/Lib/numbers.py b/Lib/numbers.py
index 9548aebd776a7..8e37d79fa755a 100644
--- a/Lib/numbers.py
+++ b/Lib/numbers.py
@@ -143,7 +143,7 @@ def __rtruediv__(self, other):
@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 @@ def __trunc__(self):
"""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 @@ def __divmod__(self, other):
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.
More information about the Python-checkins
mailing list