On Tue, Aug 01, 2006, Ron Adam wrote: > > I'm -1 on implicitly converting to an int when rounding. > > One reason is if your rounded (to int type) number is then used in an > equation you my end up with a integer result when you wanted a floating > point result. > > >>> 23.5/5.2 > 4.5192307692307692 > >>> round(23.5)/round(5.2) > 4.7999999999999998 > >>> round(23.5/5.2) > 5.0 > >>> int(round(23.5))/int(round(5.2)) > 4
That's not relevant to Py3K. Which is where this discussion should proably move because round() ain't changing in 2.x. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian W. Kernighan _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com