Browse Source

[ADD] implement equality

pull/480/head
Holger Brunn 8 years ago
parent
commit
dc9fe48086
No known key found for this signature in database GPG Key ID: 1C9760FECA3AE18
  1. 6
      field_rrule/field_rrule.py

6
field_rrule/field_rrule.py

@ -70,6 +70,12 @@ class SerializableRRuleSet(rruleset, list):
def __getslice__(self, i, j):
return rruleset.__getitem__(self(), slice(i, j))
def __ne__(self, o):
return not self.__eq__(o)
def __eq__(self, o):
return self.__repr__() == o.__repr__()
def between(self, after, before, inc=False):
return self().between(after, before, inc=inc)

Loading…
Cancel
Save