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/075798.html below:

[Python-Dev] Return type of round, floor, and ceil in 2.6

[Python-Dev] Return type of round, floor, and ceil in 2.6Jeffrey Yasskin jyasskin at gmail.com
Thu Jan 3 08:52:46 CET 2008
I've been backporting pep 3141 to the trunk, and ran into the issue
that round, math.floor, and math.ceil, which it specifies to return
Integrals, currently return floats. Guido suggested privately that, to
make sure that 2.6 is compatible with 2.5, they should keep returning
floats for float arguments. Probably this implies that they should
also keep returning float for int and long arguments.

For other types, we're probably free to do whatever. Consistency
across all Real implementations suggests that those 3 functions should
always return their argument type. Consistency and compatibility with
3.0 suggest that they should return long for every new type we add
them to. What does the list think?

Thanks,
Jeffrey Yasskin
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