Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37860447
en ru br
ALT Linux repos
S:0.0.6-alt2

Group :: Development/Python3
RPM: python3-module-bitmap

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: port-on-python3.patch
Download


diff --git a/bitmap/src/__init__.py b/bitmap/src/__init__.py
index b341748..7a6e1c2 100644
--- a/bitmap/src/__init__.py
+++ b/bitmap/src/__init__.py
@@ -1 +1 @@
-from bitmap import BitMap
+from bitmap.bitmap import BitMap
diff --git a/bitmap/src/bitmap.py b/bitmap/src/bitmap.py
index c78c7a3..b1e92e2 100755
--- a/bitmap/src/bitmap.py
+++ b/bitmap/src/bitmap.py
@@ -20,7 +20,7 @@ class BitMap(object):
     """
 
     BITMASK = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80]
-    BIT_CNT = [bin(i).count("1") for i in xrange(256)]
+    BIT_CNT = [bin(i).count("1") for i in range(256)]
 
     def __init__(self, maxnum=0):
         """
@@ -93,7 +93,7 @@ class BitMap(object):
         """
         Get all non-zero bits
         """
-        return [i for i in xrange(self.size()) if self.test(i)]
+        return [i for i in range(self.size()) if self.test(i)]
 
     def tostring(self):
         """
@@ -148,7 +148,7 @@ class BitMap(object):
         """
         nbits = len(bitstring)
         bm = cls(nbits)
-        for i in xrange(nbits):
+        for i in range(nbits):
             if bitstring[-i-1] == '1':
                 bm.set(i)
             elif bitstring[-i-1] != '0':
-- 
2.24.1
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin