[Python-checkins] CVS: python/dist/src/Doc/ref ref3.tex,1.73,1.74
Fred L. Drake
fdrake@users.sourceforge.net
Tue, 18 Sep 2001 10:58:22 -0700
Update of /cvsroot/python/python/dist/src/Doc/ref
In directory usw-pr-cvs1:/tmp/cvs-serv20334/ref
Modified Files:
ref3.tex
Log Message:
Fix minor usage and consistency nits.
Index: ref3.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** ref3.tex 2001/09/10 15:16:08 1.73
--- ref3.tex 2001/09/18 17:58:20 1.74
***************
*** 1146,1152 ****
below; they should not define \method{__coerce__()} or other numerical
operators. It is recommended that both mappings and sequences
! implement the \method{__contains__}, to allow efficient use of the
! \code{in} operator; for mappings, \code{in} should be equivalent of
! \method{has_key()}; for sequences, it should search through the values.
\withsubitem{(mapping object method)}{
\ttindex{keys()}
--- 1146,1153 ----
below; they should not define \method{__coerce__()} or other numerical
operators. It is recommended that both mappings and sequences
! implement the \method{__contains__()} method to allow efficient use of
! the \code{in} operator; for mappings, \code{in} should be equivalent
! of \method{has_key()}; for sequences, it should search through the
! values.
\withsubitem{(mapping object method)}{
\ttindex{keys()}
***************
*** 1311,1315 ****
The membership test operators (\keyword{in} and \keyword{not in}) are
! normally implemented as iteration loop through the sequence. However,
sequence objects can supply the following special method with a more
efficient implementation:
--- 1312,1316 ----
The membership test operators (\keyword{in} and \keyword{not in}) are
! normally implemented as an iteration through the sequence. However,
sequence objects can supply the following special method with a more
efficient implementation: