Commits

Brian Kearns committed d1488e4

add a fast path to this check

  • Participants
  • Parent commits 722d0a4

Comments (0)

Files changed (1)

lib_pypy/datetime.py

     raise ValueError("%s()=%d, must be in -1439..1439" % (name, offset))
 
 def _check_int_field(value):
+    if isinstance(value, int):
+        return value
     if not isinstance(value, float):
         try:
             value = value.__int__()