commit d2db38fc198ad2c196823811e3d10c7b2d90a164
parent cd7300d83144b66c936a32bc5d1009964fec6c99
Author: William Casarin <jb55@jb55.com>
Date: Mon, 3 Jun 2019 12:13:06 -0700
fix mph-opcodes python
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mph-opcodes b/mph-opcodes
@@ -40,7 +40,7 @@ def CreateMinimalPerfectHash( dict ):
# Step 2: Sort the buckets and process the ones with the most items first.
buckets.sort( key=len, reverse=True )
- for b in xrange( size ):
+ for b in range( size ):
bucket = buckets[b]
if len(bucket) <= 1: break
@@ -68,10 +68,10 @@ def CreateMinimalPerfectHash( dict ):
# placing them into a free slot. Use a negative value of d to indicate
# this.
freelist = []
- for i in xrange(size):
+ for i in range(size):
if values[i] == None: freelist.append( i )
- for b in xrange( b, size ):
+ for b in range( b, size ):
bucket = buckets[b]
if len(bucket) == 0: break
slot = freelist.pop()