remove the ability of datetime.time to be considered false (closes #13936)

This commit is contained in:
Benjamin Peterson 2014-03-20 18:00:35 -05:00
parent 265ae86414
commit ee6bdc07d6
6 changed files with 20 additions and 64 deletions

View file

@ -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):