Some more drei stuff

This commit is contained in:
Miroslav Stampar
2019-03-28 15:14:16 +01:00
parent 49586ad6dd
commit 4b020c4257
81 changed files with 125 additions and 167 deletions

View File

@@ -1,10 +1,12 @@
#!/usr/bin/env python2
#!/usr/bin/env python
"""
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
import numbers
class xrange(object):
"""
Advanced (re)implementation of xrange (supports slice/copy/etc.)
@@ -68,7 +70,7 @@ class xrange(object):
start, stop, step = index.indices(self._len())
return xrange(self._index(start),
self._index(stop), step * self.step)
elif isinstance(index, (int, long)):
elif isinstance(index, numbers.Integral):
if index < 0:
fixed_index = index + self._len()
else: