summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/datetime.py7
-rw-r--r--Lib/test/datetimetester.py2
2 files changed, 1 insertions, 8 deletions
diff --git a/Lib/datetime.py b/Lib/datetime.py
index 3f29bc4b7a..b734a743d0 100644
--- a/Lib/datetime.py
+++ b/Lib/datetime.py
@@ -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.
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index 467fbe2f45..5d2df323a9 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -679,7 +679,7 @@ class TestTimeDelta(HarmlessMixedComparison, unittest.TestCase):
us_per_day = us_per_hour * 24
eq(td(days=.4/us_per_day), td(0))
eq(td(hours=.2/us_per_hour), td(0))
- eq(td(days=.4/us_per_day, hours=.2/us_per_hour), td(microseconds=1), td)
+ eq(td(days=.4/us_per_day, hours=.2/us_per_hour), td(microseconds=1))
eq(td(days=-.4/us_per_day), td(0))
eq(td(hours=-.2/us_per_hour), td(0))