Skip to content

Commit

Permalink
Define xrange() in Python 3
Browse files Browse the repository at this point in the history
__xrange()__ was removed in Python 3 in favor of a reworked version of __range()__.  Discovered via ArduPilot/ardupilot#10278
  • Loading branch information
cclauss authored and davidbuzz committed Apr 25, 2022
1 parent f946941 commit 8568c85
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions playground/compress/optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

import os, subprocess, shutil, random, optparse

try:
xrange # Python 2
except NameError: # Python 3
xrange = range

comp = {
'bz2': 'cjf',
'xz' : 'cJf',
Expand Down

0 comments on commit 8568c85

Please sign in to comment.