This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients jyasskin, rhettinger
Date 2008-01-29.22:55:44
SpamBayes Score 0.0623995
Marked as misclassified No
Message-id <1201647350.7.0.0255165658093.issue1968@psf.upfronthosting.co.za>
In-reply-to
Content
The Py2.6 code has __round__, __ceil__, and __floor__ methods still in
several objects (int, longs, float, Rational) but they are not invoked
by anything.   For example, round(Rational(22,7)) does not use the
Rational.__round__ code and round(22) does not use the code for
int.__round__; the code is just ignored.  Since the code is not used, it
probably shouldn't be in Py2.6.

I think these backports happened before Guido decided, "I think the
pre-3.0 rule should be: round(), math.floor(), math.ceil()
*always* return a float."  Probably, rev 59731 may have intended to
revert these changes but just missed them.  IIRC, the decision was that
only __trunc__ would be backported and the other three magic methods
would wait for Py3.0 where their invocation functions would get their
new signature and start calling the magic methods.
History
Date User Action Args
2008-01-29 22:55:50rhettingersetspambayes_score: 0.0623995 -> 0.0623995
recipients: + rhettinger, jyasskin
2008-01-29 22:55:50rhettingersetspambayes_score: 0.0623995 -> 0.0623995
messageid: <1201647350.7.0.0255165658093.issue1968@psf.upfronthosting.co.za>
2008-01-29 22:55:44rhettingerlinkissue1968 messages
2008-01-29 22:55:44rhettingercreate