Author: Brian Kearns <bdkea...@gmail.com> Branch: Changeset: r68453:2e0e9bfcb1a2 Date: 2013-12-17 20:39 -0500 http://bitbucket.org/pypy/pypy/changeset/2e0e9bfcb1a2/
Log: simplify {date,time,datetime}.replace (constructor does field validation, no need for it here) diff --git a/lib_pypy/datetime.py b/lib_pypy/datetime.py --- a/lib_pypy/datetime.py +++ b/lib_pypy/datetime.py @@ -878,7 +878,6 @@ month = self._month if day is None: day = self._day - year, month, day = _check_date_fields(year, month, day) return date(year, month, day) # Comparisons of date objects with other. @@ -1389,8 +1388,6 @@ microsecond = self.microsecond if tzinfo is True: tzinfo = self.tzinfo - hour, minute, second, microsecond = _check_time_fields(hour, minute, second, microsecond) - _check_tzinfo_arg(tzinfo) return time(hour, minute, second, microsecond, tzinfo) def __nonzero__(self): @@ -1608,9 +1605,6 @@ microsecond = self.microsecond if tzinfo is True: tzinfo = self.tzinfo - year, month, day = _check_date_fields(year, month, day) - hour, minute, second, microsecond = _check_time_fields(hour, minute, second, microsecond) - _check_tzinfo_arg(tzinfo) return datetime(year, month, day, hour, minute, second, microsecond, tzinfo) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit