mirror of
https://github.com/python/cpython.git
synced 2025-07-20 17:55:21 +00:00
Correct spelling of length, discovered by Christian Tismer.
This commit is contained in:
parent
a889add5d6
commit
eda80eae36
1 changed files with 2 additions and 2 deletions
|
@ -84,7 +84,7 @@ class BitVec:
|
||||||
raise error, 'bitvec()\'s 2nd parameter must be int'
|
raise error, 'bitvec()\'s 2nd parameter must be int'
|
||||||
computed_length = _compute_len(param)
|
computed_length = _compute_len(param)
|
||||||
if computed_length > length:
|
if computed_length > length:
|
||||||
print 'warning: bitvec() value is longer than the lenght indicates, truncating value'
|
print 'warning: bitvec() value is longer than the length indicates, truncating value'
|
||||||
self._data = self._data & \
|
self._data = self._data & \
|
||||||
((1L << length) - 1)
|
((1L << length) - 1)
|
||||||
self._len = length
|
self._len = length
|
||||||
|
@ -178,7 +178,7 @@ class BitVec:
|
||||||
if length == 0 or other._len == 0:
|
if length == 0 or other._len == 0:
|
||||||
return cmp(length, other._len)
|
return cmp(length, other._len)
|
||||||
if length != other._len:
|
if length != other._len:
|
||||||
min_lenght = min(length, other._len)
|
min_length = min(length, other._len)
|
||||||
return cmp(self[:min_length], other[:min_length]) or \
|
return cmp(self[:min_length], other[:min_length]) or \
|
||||||
cmp(self[min_length:], other[min_length:])
|
cmp(self[min_length:], other[min_length:])
|
||||||
#the lengths are the same now...
|
#the lengths are the same now...
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue