[issue1682] Move Demo/classes/Rat.py to Lib/rational.py and fix it up.
Guido van Rossum
report at bugs.python.org
Sun Feb 10 17:19:20 CET 2008
Guido van Rossum added the comment:
> I'm not sure I like the idea of names Rational and Fraction; the two
> classes numbers.Rational and rational.Rational are quite different beasts,
> and using two almost-synonyms for their names seems like a bad idea.
> Is there some more descriptive name for numbers.Rational that might give a
> hint of its ABC-ness?
I'd rather not change the Rational ABC's name -- it is the
mathematically accepted term (Complex, Real, Rational, Integer, and
then natural numbers I believe). I'd rather not add a suffix or prefix
like A or Abc to the ABCs either. To be honest, we have a rather
hodge-podge of mappings from numeric ABCs to concrete implementations:
Complex/complex, Real/float, Rational/?, Integer/int. I think that,
given that fraction is the *common* name for rationals (see
wikipedia), it fits relatively well. We can introduce fractions
without ever mentioning the ABCs and users will immediately know what
they mean even if they haven't got more than grade school math.
Tracker <report at bugs.python.org>
More information about the Python-bugs-list