the function should be a class method instead of instance method because it doesn't perform an action on the instance

This commit is contained in:
Peter van 't Zand 2015-07-15 14:06:03 +02:00
parent c0d478f14c
commit f7ba4bc74d
1 changed files with 2 additions and 1 deletions

View File

@ -167,7 +167,8 @@ class croniter(object):
return result
def _timedelta_to_seconds(self, td):
@classmethod
def _timedelta_to_seconds(cls, td):
"""
Converts a 'datetime.timedelta' object `td` into seconds contained in
the duration