Author tim.peters
Recipients Nofar Schnider, gvanrossum, mark.dickinson, rhettinger, serhiy.storchaka, tim.peters
Date 2018-03-15.16:00:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1521129619.64.0.467229070634.issue33073@psf.upfronthosting.co.za>
In-reply-to
Content
Serhiy, I don't understand.  If `numbers.Rational` is in fact a superclass of `numpy.int64`, then the latter will inherit an implementation added to the former.  The idea here isn't to add an abstract method to the Rational interface, but a concrete default implementation:

class Rational(Real):
    ...
    def as_integer_ratio(self):
        return (self.numerator, self.denominator)

Or, as for Python ints, is Rational a "make believe" (virtual) superclass of numpy.int64?
History
Date User Action Args
2018-03-15 16:00:19tim.peterssetrecipients: + tim.peters, gvanrossum, rhettinger, mark.dickinson, serhiy.storchaka, Nofar Schnider
2018-03-15 16:00:19tim.peterssetmessageid: <1521129619.64.0.467229070634.issue33073@psf.upfronthosting.co.za>
2018-03-15 16:00:19tim.peterslinkissue33073 messages
2018-03-15 16:00:19tim.peterscreate