Robert Smallshire added the comment: >> Were float to inherit from Rational, rather than Real ...
> This would break the Liskov substitution principle. How so? Rational extends Real with only numerator, denominator and __float__. Isn't the existence of float.as_integer_ratio demonstration that numerator and denominator could be implemented? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26680> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com