Every line of 'python range reverse' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
79 def __reversed__(self): 80 """Return an xrange which represents a sequence whose 81 contents are the same as the sequence this xrange 82 represents, but in the opposite order.""" 83 sign = self._step / abs(self._step) 84 last = self._start + ((self._len - 1) * self._step) 85 return xrange(last, self._start - sign, -1 * self._step)