[Python-checkins] python/dist/src/Doc/lib libstdtypes.tex, 1.157, 1.158

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Thu Jul 22 21:33:55 CEST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14655

Modified Files:
	libstdtypes.tex 
Log Message:
SF bug #995983 and #995987:  Documentation nits.



Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.157
retrieving revision 1.158
diff -C2 -d -r1.157 -r1.158
*** libstdtypes.tex	1 Jul 2004 19:58:47 -0000	1.157
--- libstdtypes.tex	22 Jul 2004 19:33:53 -0000	1.158
***************
*** 1186,1189 ****
--- 1186,1193 ----
  superset of the second set (is a superset, but is not equal).
  
+ Instanceas of \class{set} are compared to instances of \class{frozenset} based
+ on their members.  For example, \samp{set('abc') == frozenset('abc')} returns
+ \code{True}.     
+ 
  The subset and equality comparisons do not generalize to a complete
  ordering function.  For example, any two disjoint sets are not equal and
***************
*** 1196,1204 ****
  of the \method{list.sort()} method is undefined for lists of sets.
  
! For convenience in implementing sets of sets, the \method{__contains__()},
! \method{remove()}, and \method{discard()} methods automatically match
! instances of the \class{set} class their \class{frozenset} counterparts
! inside a set.  For example, \code{set('abc') in set([frozenset('abc')])}
! returns \code{True}.
  
  The following table lists operations available for \class{set}
--- 1200,1206 ----
  of the \method{list.sort()} method is undefined for lists of sets.
  
! Binary operations that mix \class{set} instances with \class{frozenset}
! return the type of the first operand.  For example:
! \samp{frozenset('ab') | set('bc')} returns an instance of \class{frozenset}.
  
  The following table lists operations available for \class{set}



More information about the Python-checkins mailing list