Message313891
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? |
|
Date |
User |
Action |
Args |
2018-03-15 16:00:19 | tim.peters | set | recipients:
+ tim.peters, gvanrossum, rhettinger, mark.dickinson, serhiy.storchaka, Nofar Schnider |
2018-03-15 16:00:19 | tim.peters | set | messageid: <1521129619.64.0.467229070634.issue33073@psf.upfronthosting.co.za> |
2018-03-15 16:00:19 | tim.peters | link | issue33073 messages |
2018-03-15 16:00:19 | tim.peters | create | |
|