This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ben Burrill
Recipients Ben Burrill
Date 2017-10-05.23:08:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507244906.43.0.213398074469.issue31707@psf.upfronthosting.co.za>
In-reply-to
Content
fractions.Fraction enforces its numerator and denominator to be rational.  This is a good idea for purely numeric fractions, but the abstractions that fractions.Fraction offers would also be useful for more abstract fractions.

Some places where this might be useful would be fractions of polynomial types or fractions with abstract irrational numeric types, like F(SquareRoot(3), 2).

This could be accomplished by having a more general Fraction superclass or by removing the requirement of rationality from fractions.Fraction.  It is not trivial to create a subclass of Fraction that does this because the operators are hardcoded to use Fraction and initiation is done in __new__.
History
Date User Action Args
2017-10-05 23:08:26Ben Burrillsetrecipients: + Ben Burrill
2017-10-05 23:08:26Ben Burrillsetmessageid: <1507244906.43.0.213398074469.issue31707@psf.upfronthosting.co.za>
2017-10-05 23:08:26Ben Burrilllinkissue31707 messages
2017-10-05 23:08:26Ben Burrillcreate