A Revised Rational Proposal
mwm at mired.org
Mon Dec 27 05:30:09 CET 2004
Nick Coghlan <ncoghlan at iinet.net.au> writes:
> Mike Meyer wrote:
>> Regarding str() and repr() behaviour, Ka-Ping Yee proposes that repr() have
>> the same behaviour as str() and Tim Peters proposes that str() behave like the
>> to-scientific-string operation from the Spec.
> This looks like a C & P leftover from the Decimal PEP :)
Yup. Thank you. This now reads:
Regarding str() and repr() behaviour, repr() will be either
''rational(num)'' if the denominator is one, or ''rational(num,
denom)'' if the denominator is not one. str() will be either ''num''
if the denominator is one, or ''(num / denom)'' if the denominator is
Is that acceptable?
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list