Commits

Christian Tismer committed 0145566

reverted a bad import of pypy into app_operator

  • Participants
  • Parent commits 09f1440
  • Branches win64-stage1

Comments (0)

Files changed (1)

File pypy/module/operator/app_operator.py

 equivalent to x+y.
 '''
 from __pypy__ import builtinify
-from pypy.rlib.rarithmetic import is_valid_int
-
 
 def countOf(a,b): 
     'countOf(a, b) -- Return the number of times b occurs in a.'
 
 def repeat(obj, num):
     'repeat(a, b) -- Return a * b, where a is a sequence, and b is an integer.'
-    if not is_valid_int(num):
+    if not isinstance(num, (int, long)):
         raise TypeError, 'an integer is required'
     if not isSequenceType(obj):
         raise TypeError, "non-sequence object can't be repeated"