def __next__(self):
"""
Returns the next occurrence or raises StopIteration
This method adds some extra validation for the returned
iteration that are not natively handled by rrule
"""
while True:
next_it = next(self.__rrule_iterator)
next_it = self.t_zone.localize(next_it, is_dst=None)
if not all([filt(next_it) for filt in self.filters]):
continue
return next_it
# Private helpers
评论列表
文章目录