Mercurial > public > mercurial-scm > hg-stable
diff mercurial/pure/base85.py @ 9029:0001e49f1c11
compat: use // for integer division
author | Alejandro Santos <alejolp@alejolp.com> |
---|---|
date | Sun, 05 Jul 2009 11:00:44 +0200 |
parents | 9e055cfdd620 |
children | 25e572394f5c |
line wrap: on
line diff
--- a/mercurial/pure/base85.py Sun Jul 05 10:59:54 2009 +0200 +++ b/mercurial/pure/base85.py Sun Jul 05 11:00:44 2009 +0200 @@ -25,8 +25,8 @@ longs = len(text) >> 2 words = struct.unpack('>%dL' % (longs), text) - out = ''.join(_b85chars[(word / 52200625) % 85] + - _b85chars2[(word / 7225) % 7225] + + out = ''.join(_b85chars[(word // 52200625) % 85] + + _b85chars2[(word // 7225) % 7225] + _b85chars2[word % 7225] for word in words) @@ -37,7 +37,7 @@ olen = l % 4 if olen: olen += 1 - olen += l / 4 * 5 + olen += l // 4 * 5 return out[:olen] def b85decode(text):