Ben Burrill <bburril...@gmail.com> added the comment:

The core operators, like multiplication and division, should work for any type 
that defines the right operators.  Hashing is tricky, and reducing the fraction 
is pretty much off the table.  This is why I suggested a superclass.  I'll try 
making a patch sometime soon.

I am aware of sympy and am not proposing that the standard library stray too 
far into symbolic mathematics.  Sympy's re-invention of the fraction makes 
sense given sympy's scope, but simpler libraries that offer other abstract math 
features (like one that just implemented a simple Polynomial type) would 
benefit from using fractions.Fraction.

This change would probably make it so that sympy symbols worked with 
fractions.Fraction, which although unnecessary, might be nice.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31707>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to