diff options
author | Nick Smith <nick.smith@torchbox.com> | 2015-02-26 09:57:18 +0000 |
---|---|---|
committer | Nick Smith <nick.smith@torchbox.com> | 2015-02-26 09:57:18 +0000 |
commit | 62e6cae241cd6033009ef2d5a6d87fe7ea15bfe6 (patch) | |
tree | 7d12e578a653822175c402f7831842598a10ffac /dateutil/relativedelta.py | |
parent | 7fc295aa3579dc35a8a1904ac10046b5873feb76 (diff) | |
download | dateutil-62e6cae241cd6033009ef2d5a6d87fe7ea15bfe6.tar.gz |
Implement relativedelta.__nonzero__ for python 2.x compatibility
Diffstat (limited to 'dateutil/relativedelta.py')
-rw-r--r-- | dateutil/relativedelta.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dateutil/relativedelta.py b/dateutil/relativedelta.py index 2b5557a..da05572 100644 --- a/dateutil/relativedelta.py +++ b/dateutil/relativedelta.py @@ -375,6 +375,8 @@ Here is the behavior of operations with relativedelta: self.minute is None and self.second is None and self.microsecond is None) + # Compatibility with Python 2.x + __nonzero__ = __bool__ def __mul__(self, other): f = float(other) |