Greg Ewing wrote: > Raymond Hettinger wrote: > >> I think this would harm more than it would help. It more confusing to >> have several rounding-thingies to choose from than it is have an >> explicit two-step. > > But is it more confusing enough to be worth forcing > everyone to pay two function calls instead of one > in the most common case?
I suppose you don't know about the optional argument to round that lets you round up to a certain decimal ?! If we were to follow your suggestion, we'd have round() return an integer when called without the argument and a float when called with the argument. Dependency of the return type on arguments to a function should be avoided, if possible. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Aug 01 2006) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ 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