@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
"""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].
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.