diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2007-09-21 20:19:23 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2007-09-21 20:19:23 (GMT) |
commit | 16c7075164abe85f7cf750d6b63ee2b5ddaa2f54 (patch) | |
tree | fffa0bfcdd832cc4d5cb323748b74c13796344e6 /Demo/classes | |
parent | 8ce81f767a48e9e645c523137c7f83e49f79f986 (diff) | |
download | cpython-16c7075164abe85f7cf750d6b63ee2b5ddaa2f54.zip cpython-16c7075164abe85f7cf750d6b63ee2b5ddaa2f54.tar.gz cpython-16c7075164abe85f7cf750d6b63ee2b5ddaa2f54.tar.bz2 |
Remove more cruft leftover from nb_coerce. Rename nb_coerce to
nb_reserved.
Diffstat (limited to 'Demo/classes')
-rwxr-xr-x | Demo/classes/Rat.py | 4 | ||||
-rwxr-xr-x | Demo/classes/bitvec.py | 7 |
2 files changed, 0 insertions, 11 deletions
diff --git a/Demo/classes/Rat.py b/Demo/classes/Rat.py index 8caf1c5..6a350e8 100755 --- a/Demo/classes/Rat.py +++ b/Demo/classes/Rat.py @@ -226,10 +226,6 @@ class Rat: def __bool__(a): return a.__num != 0 - # coercion - def __coerce__(a, b): - return a, Rat(b) - def test(): '''\ Test function for rat module. diff --git a/Demo/classes/bitvec.py b/Demo/classes/bitvec.py index 227a536..ae84439 100755 --- a/Demo/classes/bitvec.py +++ b/Demo/classes/bitvec.py @@ -311,13 +311,6 @@ class BitVec: return BitVec(~self._data & ((1 << self._len) - 1), \ self._len) - def __coerce__(self, otherseq, *rest): - #needed for *some* of the arithmetic operations - #rprt('%r.__coerce__%r\n' % (self, (otherseq,) + rest)) - if type(otherseq) != type(self): - otherseq = bitvec(otherseq, *rest) - return self, otherseq - def __int__(self): return int(self._data) |