(a, b)
return div, Fraction(n_mod, da * db)
(a // b, a % b)
(a // b, a % b)
( a // b a % b )
def _divmod(a, b):
        """(a // b, a % b)"""
        da, db = a.denominator, b.denominator
        div, n_mod = divmod(a.numerator * db, da * b.numerator)
        return div, Fraction(n_mod, da * db)
def _divmod ( a , b ) : da , db = a . denominator , b . denominator div , n_mod = divmod ( a . numerator * db , da * b . numerator ) return div , Fraction ( n_mod , da * db )