Commits

Preston Timmons committed 57b982e

Replaced long and xrange keywards in the operator module.

  • Participants
  • Parent commits dc7f10d
  • Branches py3k

Comments (0)

Files changed (2)

File pypy/module/operator/app_operator.py

 
 def repeat(obj, num):
     'repeat(a, b) -- Return a * b, where a is a sequence, and b is an integer.'
-    if not isinstance(num, (int, long)):
+    if not isinstance(num, int):
         raise TypeError('an integer is required')
     if not isSequenceType(obj):
         raise TypeError("non-sequence object can't be repeated")

File pypy/module/operator/test/test_operator.py

         raises(TypeError, operator.isSequenceType)
         assert operator.isSequenceType(dir())
         assert operator.isSequenceType(())
-        assert operator.isSequenceType(xrange(10))
+        assert operator.isSequenceType(range(10))
         assert operator.isSequenceType('yeahbuddy')
         assert not operator.isSequenceType(3)
         class Dict(dict): pass