Skip to content

Commit

Permalink
removed super functions
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanReiter committed Jun 16, 2011
1 parent 6c1c4b9 commit 670367c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flexibledatefield/flexibledate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def fix_date_format(s):
return re.sub(r'\b0+([0-9])', r'\1', s)

def _cmperror(x, y):
raise TypeError("can't compare '%s' to '%s'" % (
raise TypeError("can't compare '%s' to '%s'.." % (
type(x).__name__, type(y).__name__))

_MIN_VALUE = 10000000
Expand Down Expand Up @@ -99,7 +99,7 @@ def __add__(self, other):
return new_fd
elif isinstance(other, datetime.date) or isinstance(other, datetime.datetime):
return self + flexibledate(other)
return super(flexibledate, self).__add__(other)
raise TypeError("unsupported operand type(s) for +: %s and %s" % (type(self).__name__, type(other).__name__))

def __sub__(self, other):
if isinstance(other, flexibledatedelta):
Expand All @@ -117,7 +117,7 @@ def __sub__(self, other):
return flexibledatedelta(diff_years, diff_months, diff_days)
elif isinstance(other, datetime.date) or isinstance(other, datetime.datetime):
return self + -flexibledate(other)
return super(flexibledate, self).__sub__(other)
raise TypeError("unsupported operand type(s) for -: %s and %s" % (type(self).__name__, type(other).__name__))


def __eq__(self, other):
Expand Down

0 comments on commit 670367c

Please sign in to comment.