[Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.42,1.43

Moshe Zadka python-dev@python.org
Thu, 30 Nov 2000 04:31:07 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv21539/Doc/lib

Modified Files:
	libstdtypes.tex 
Log Message:
Added .first{item,value,key}() to dictionaries.
Complete with docos and tests.
OKed by Guido.


Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** libstdtypes.tex	2000/11/17 19:44:14	1.42
--- libstdtypes.tex	2000/11/30 12:31:02	1.43
***************
*** 784,789 ****
--- 784,793 ----
    \ttindex{items()}
    \ttindex{keys()}
+   \ttindex{firstitem()}
+   \ttindex{firstkey()}
    \ttindex{update()}
    \ttindex{values()}
+   \ttindex{firstvalue()}
+   \ttindex{setdefault()}
    \ttindex{get()}}
  
***************
*** 805,813 ****
--- 809,825 ----
            {a copy of \var{a}'s list of (\var{key}, \var{value}) pairs}
            {(2)}
+   \lineiii{\var{a}.firstitem()}
+           {a (\var{key}, \var{value}) pair, the first one in \var{a}.items()}
+           {(2)}
    \lineiii{\var{a}.keys()}{a copy of \var{a}'s list of keys}{(2)}
+   \lineiii{\var{a}.firstkey()}
+           {the first element in \var{a}.keys()}
+           {(2)}
    \lineiii{\var{a}.update(\var{b})}
            {\code{for k in \var{b}.keys(): \var{a}[k] = \var{b}[k]}}
            {(3)}
    \lineiii{\var{a}.values()}{a copy of \var{a}'s list of values}{(2)}
+   \lineiii{\var{a}.firstvalue()}
+           {the first element in \var{a}.values()}
    \lineiii{\var{a}.get(\var{k}\optional{, \var{x}})}
            {\code{\var{a}[\var{k}]} if \code{\var{a}.has_key(\var{k})},