summaryrefslogtreecommitdiffstats
path: root/Demo/classes/bitvec.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-17 08:00:19 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-17 08:00:19 (GMT)
commitd91085598f5185b267ea51a3f615da9527af2ed2 (patch)
tree80849b9455438e9963a61d7aff3fc3b060213553 /Demo/classes/bitvec.py
parentfe55464f393fc002fd0911a4d8dba6694723d408 (diff)
downloadcpython-d91085598f5185b267ea51a3f615da9527af2ed2.zip
cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.gz
cpython-d91085598f5185b267ea51a3f615da9527af2ed2.tar.bz2
Remove apply()
Diffstat (limited to 'Demo/classes/bitvec.py')
-rwxr-xr-xDemo/classes/bitvec.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Demo/classes/bitvec.py b/Demo/classes/bitvec.py
index 2894a56..934d33a 100755
--- a/Demo/classes/bitvec.py
+++ b/Demo/classes/bitvec.py
@@ -172,7 +172,7 @@ class BitVec:
def __cmp__(self, other, *rest):
#rprt('%r.__cmp__%r\n' % (self, (other,) + rest))
if type(other) != type(self):
- other = apply(bitvec, (other, ) + rest)
+ other = bitvec(other, *rest)
#expensive solution... recursive binary, with slicing
length = self._len
if length == 0 or other._len == 0:
@@ -237,7 +237,7 @@ class BitVec:
#rprt('%s.__setslice__%r\n' % (self, (i, j, sequence) + rest))
i, j = _check_slice(self._len, i, j)
if type(sequence) != type(self):
- sequence = apply(bitvec, (sequence, ) + rest)
+ sequence = bitvec(sequence, *rest)
#sequence is now of our own type
ls_part = self[:i]
ms_part = self[j:]
@@ -283,7 +283,7 @@ class BitVec:
def __and__(self, otherseq, *rest):
#rprt('%r.__and__%r\n' % (self, (otherseq,) + rest))
if type(otherseq) != type(self):
- otherseq = apply(bitvec, (otherseq, ) + rest)
+ otherseq = bitvec(otherseq, *rest)
#sequence is now of our own type
return BitVec(self._data & otherseq._data, \
min(self._len, otherseq._len))
@@ -292,7 +292,7 @@ class BitVec:
def __xor__(self, otherseq, *rest):
#rprt('%r.__xor__%r\n' % (self, (otherseq,) + rest))
if type(otherseq) != type(self):
- otherseq = apply(bitvec, (otherseq, ) + rest)
+ otherseq = bitvec(otherseq, *rest)
#sequence is now of our own type
return BitVec(self._data ^ otherseq._data, \
max(self._len, otherseq._len))
@@ -301,7 +301,7 @@ class BitVec:
def __or__(self, otherseq, *rest):
#rprt('%r.__or__%r\n' % (self, (otherseq,) + rest))
if type(otherseq) != type(self):
- otherseq = apply(bitvec, (otherseq, ) + rest)
+ otherseq = bitvec(otherseq, *rest)
#sequence is now of our own type
return BitVec(self._data | otherseq._data, \
max(self._len, otherseq._len))
@@ -316,7 +316,7 @@ class BitVec:
#needed for *some* of the arithmetic operations
#rprt('%r.__coerce__%r\n' % (self, (otherseq,) + rest))
if type(otherseq) != type(self):
- otherseq = apply(bitvec, (otherseq, ) + rest)
+ otherseq = bitvec(otherseq, *rest)
return self, otherseq
def __int__(self):