summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f77c6b6)
If the input is already a multiple of the modulus, then don't round up
to the next one.
def pad(me, sz):
if sz > me.max: raise ValueError, 'key too large'
elif sz < me.min: return me.min
def pad(me, sz):
if sz > me.max: raise ValueError, 'key too large'
elif sz < me.min: return me.min
- else: sz += me.mod; return sz - sz%me.mod
+ else: sz += me.mod - 1; return sz - sz%me.mod
_augment(KeySZRange, _tmp)
class _tmp:
_augment(KeySZRange, _tmp)
class _tmp: