mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
cleanup datetime code
remove scories of round half up code and debug code.
This commit is contained in:
parent
7667f58151
commit
cd5d765b0e
2 changed files with 1 additions and 8 deletions
|
@ -316,13 +316,6 @@ def _divide_and_round(a, b):
|
|||
|
||||
return q
|
||||
|
||||
def _round_half_up(x):
|
||||
"""Round to nearest with ties going away from zero."""
|
||||
if x >= 0.0:
|
||||
return _math.floor(x + 0.5)
|
||||
else:
|
||||
return _math.ceil(x - 0.5)
|
||||
|
||||
|
||||
class timedelta:
|
||||
"""Represent the difference between two datetime objects.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue