Divide two Rats, returning the floored result.
(self, other)
| 146 | return NotImplemented |
| 147 | |
| 148 | def __floordiv__(self, other): |
| 149 | """Divide two Rats, returning the floored result.""" |
| 150 | if isint(other): |
| 151 | other = Rat(other) |
| 152 | elif not isRat(other): |
| 153 | return NotImplemented |
| 154 | x = self/other |
| 155 | return x.__num // x.__den |
| 156 | |
| 157 | def __rfloordiv__(self, other): |
| 158 | """Divide two Rats, returning the floored result (reversed args).""" |