A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-January/076620.html below:

[Python-Dev] functions vs methods (was Re: trunc())

[Python-Dev] functions vs methods (was Re: trunc()) [Python-Dev] functions vs methods (was Re: trunc())Raymond Hettinger python at rcn.com
Tue Jan 29 00:56:47 CET 2008
Please ignore my last email.  The idea for combining trunc, ceil,
floor, etc was probably just a distractor.

[GvR]
> One thing I'm beginning to feel more and more strongly about
> is that round, trunc, ceil and floor all belong in the same
>  category, and either should all be builtins or should all
> be in math.

+1 for all four going into the math module.


> I should also admit that the 2-arg version of round() was
> borrowed from ABC, but the use case for it there doesn't map
> to Python: in ABC it's the only tool you have for floating point
> formatting on output, while in Python the same thing would
> typically be done with "%.2f" % x rather than round(x, 2).

+1 for deprecating the second argument to round().


Raymond
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4