Michael Urman wrote: > The fact that > round returns a float rather than an int, while intentional, does not > feature prominently in one's mine when the first version yielded the > expected results.
As an aside, does anyone else think that it would be useful to have a builtin which rounds and converts to an int in one go? Whenever I use round(), I almost always want the result as an int, and making me do it in two steps seems unnecessarily bothersome. Since automatic float->int coercion is being increasingly disallowed, use cases for this are becoming more and more common. -- Greg _______________________________________________ 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