[Python-checkins] CVS: python/nondist/peps pep-0285.txt,1.4,1.5
Guido van Rossum
gvanrossum@users.sourceforge.net
Sat, 09 Mar 2002 06:53:06 -0800
Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv763
Modified Files:
pep-0285.txt
Log Message:
Fix subtle bugs in &|^ overloading.
Index: pep-0285.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0285.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pep-0285.txt 8 Mar 2002 19:48:44 -0000 1.4
--- pep-0285.txt 9 Mar 2002 14:53:04 -0000 1.5
***************
*** 104,108 ****
return bool(int(self) & int(other))
else:
! return NotImplemented
__rand__ = __and__
--- 104,108 ----
return bool(int(self) & int(other))
else:
! return int.__and__(self, other)
__rand__ = __and__
***************
*** 112,116 ****
return bool(int(self) | int(other))
else:
! return NotImplemented
__ror__ = __or__
--- 112,116 ----
return bool(int(self) | int(other))
else:
! return int.__or__(self, other)
__ror__ = __or__
***************
*** 120,124 ****
return bool(int(self) ^ int(other))
else:
! return NotImplemented
__rxor__ = __xor__
--- 120,124 ----
return bool(int(self) ^ int(other))
else:
! return int.__xor__(self, other)
__rxor__ = __xor__