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

Please ignore my last email. The idea for combining trunc, ceil, floor, etc was probably just a distractor. [GvR]
+1 for all four going into the math module.
+1 for deprecating the second argument to round(). Raymond

Raymond Hettinger wrote:
Please ignore my last email. The idea for combining trunc, ceil, floor, etc was probably just a distractor.
I was going to suggest the same round(n, mode="round_method_of choice") to both round and int(), where int is more forgiving for input. But wasn't convinced.
Works for me. It seems simple enough to just do ... from math import round_even as round This gives me the specific rounding behavior I want without a lot of noise. Ron

Raymond Hettinger wrote:
Please ignore my last email. The idea for combining trunc, ceil, floor, etc was probably just a distractor.
I was going to suggest the same round(n, mode="round_method_of choice") to both round and int(), where int is more forgiving for input. But wasn't convinced.
Works for me. It seems simple enough to just do ... from math import round_even as round This gives me the specific rounding behavior I want without a lot of noise. Ron
participants (2)
-
Raymond Hettinger
-
Ron Adam