Jeroen Demeyer wrote

>>>> from sympy import Rational
>>>> Rational(1,2) ** Rational(2,3)
> 2**(1/3)/2
>>>> Rational(1,1) ** Rational(2,3)
> 1
>>>> Rational(-1,1) ** Rational(2,3)
> (-1)**(2/3)
>>>> Rational(0,1) ** Rational(2,3)
> 0

Thank you very much for this, Jeroen. Most helpful.

Perhaps revising https://docs.python.org/3/library/fractions.html, to
mention sympy's symbolic Rational number class, would meet the
original poster's request.

Neil Girdhar - how does this sound to you?

Short of migrating part of sympy into Python's standard library, I
don't know what else we could reasonably do.

-- 
Jonathan
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to