From ee6bdc07d65d5df418ad9dc2bb7139666af9a6b2 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 20 Mar 2014 18:00:35 -0500 Subject: remove the ability of datetime.time to be considered false (closes #13936) --- Lib/datetime.py | 6 ------ 1 file changed, 6 deletions(-) (limited to 'Lib/datetime.py') diff --git a/Lib/datetime.py b/Lib/datetime.py index 1789714034..3c534d09f2 100644 --- a/Lib/datetime.py +++ b/Lib/datetime.py @@ -1249,12 +1249,6 @@ class time: _check_tzinfo_arg(tzinfo) return time(hour, minute, second, microsecond, tzinfo) - def __bool__(self): - if self.second or self.microsecond: - return True - offset = self.utcoffset() or timedelta(0) - return timedelta(hours=self.hour, minutes=self.minute) != offset - # Pickle support. def _getstate(self): -- cgit v1.2.1