Coverage for /usr/lib/python3/dist-packages/sympy/polys/domains/pythonrational.py: 88%
8 statements
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-14 15:55 +0200
« prev ^ index » next coverage.py v7.9.1, created at 2025-06-14 15:55 +0200
1"""
2Rational number type based on Python integers.
4The PythonRational class from here has been moved to
5sympy.external.pythonmpq
7This module is just left here for backwards compatibility.
8"""
11from sympy.core.numbers import Rational
12from sympy.core.sympify import _sympy_converter
13from sympy.utilities import public
14from sympy.external.pythonmpq import PythonMPQ
17PythonRational = public(PythonMPQ)
20def sympify_pythonrational(arg):
21 return Rational(arg.numerator, arg.denominator)
22_sympy_converter[PythonRational] = sympify_pythonrational