From: Guido van Rossum Date: Tue, 4 May 2004 18:18:23 +0000 (+0000) Subject: Using reversed() is not compatible with Python 1.5.2. X-Git-Tag: v2.3.4c1~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ee6e1493abeed83e43155280a57fd85cfeaeff42;p=thirdparty%2FPython%2Fcpython.git Using reversed() is not compatible with Python 1.5.2. --- diff --git a/Lib/platform.py b/Lib/platform.py index 3dc9106fe9fd..2978be25a839 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -202,7 +202,7 @@ def _dist_try_harder(distname,version,id): if os.path.isdir('/usr/lib/setup'): # Check for slackware verson tag file (thanks to Greg Andruk) verfiles = os.listdir('/usr/lib/setup') - for n in reversed(xrange(len(verfiles))): + for n in range(len(verfiles)-1, -1, -1): if verfiles[n][:14] != 'slack-version-': del verfiles[n] if verfiles: