[Python-checkins] python/nondist/sandbox/itertools itertools.c,1.5,1.6 libitertools.tex,1.6,1.7 todo.txt,1.6,1.7

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
2003年1月27日 02:44:54 -0800


Update of /cvsroot/python/python/nondist/sandbox/itertools
In directory sc8-pr-cvs1:/tmp/cvs-serv21061
Modified Files:
	itertools.c libitertools.tex todo.txt 
Log Message:
Fixed whitespace in C code to unformly use tabs.
Cited research references in the documentation.
Updated todo list.
Index: itertools.c
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/itertools/itertools.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** itertools.c	27 Jan 2003 10:02:59 -0000	1.5
--- itertools.c	27 Jan 2003 10:44:52 -0000	1.6
***************
*** 74,80 ****
 islice_dealloc(isliceobject *lz)
 {
! PyObject_GC_UnTrack(lz);
! Py_XDECREF(lz->it);
! lz->ob_type->tp_free(lz);
 }
 
--- 74,80 ----
 islice_dealloc(isliceobject *lz)
 {
[...1879 lines suppressed...]
! 	if (PyType_Ready(&ifilter_type) < 0)
! 		return;
! 	Py_INCREF(&ifilter_type);
! 	PyModule_AddObject(m, "ifilter", (PyObject *)&ifilter_type);
 
! 	if (PyType_Ready(&count_type) < 0)
! 		return;
! 	Py_INCREF(&count_type);
! 	PyModule_AddObject(m, "count", (PyObject *)&count_type);
 
! 	if (PyType_Ready(&loopzip_type) < 0)
! 		return;
! 	Py_INCREF(&loopzip_type);
! 	PyModule_AddObject(m, "loopzip", (PyObject *)&loopzip_type);
 
! 	if (PyType_Ready(&repeat_type) < 0)
! 		return;
! 	Py_INCREF(&repeat_type);
! 	PyModule_AddObject(m, "repeat", (PyObject *)&repeat_type);
 }
Index: libitertools.tex
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/itertools/libitertools.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** libitertools.tex	27 Jan 2003 10:03:04 -0000	1.6
--- libitertools.tex	27 Jan 2003 10:44:52 -0000	1.7
***************
*** 13,18 ****
 With the advent of iterators and generators in Python 2.3, each of
 these tools can be expressed easily and succinctly in pure python.
! Rather duplicating what can already be done, this module takes the
! slightly unnatural approach of providing value in other ways:
 
 \begin{itemize}
--- 13,18 ----
 With the advent of iterators and generators in Python 2.3, each of
 these tools can be expressed easily and succinctly in pure python.
! Rather duplicating what can already be done, this module emphasizes
! providing value in other ways:
 
 \begin{itemize}
***************
*** 72,78 ****
--- 72,91 ----
 \end{itemize}
 
+ \begin{seealso}
+ \seetext{The Standard ML Basis Library,
+ 	 \citetitle[http://www.standardml.org/Basis/]
+ 	 {The Standard ML Basis Library}.}
+ 
+ \seetext{Haskell, A Purely Functional Language,
+ \citetitle[http://www.haskell.org/definition/]
+ 	 {Definition of Haskell and the Standard Libraries}.}
+ \end{seealso}
+ 
 
 \subsection{Itertool functions \label{itertools-functions}}
 
+ The following module functions all construct and return iterators.
+ Some provide streams of infinite length, so they should only be accessed
+ by functions or loops that truncate the stream.
 
 \begin{funcdesc}{count}{\optional{n}}
Index: todo.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/itertools/todo.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** todo.txt	27 Jan 2003 10:03:07 -0000	1.6
--- todo.txt	27 Jan 2003 10:44:52 -0000	1.7
***************
*** 3,10 ****
--- 3,14 ----
 takewhile(pred, seqn)
 dropwhile(pred, seqn)
+ unzip(seqn) ?? does this make sense for iterators
+ exists() and any() ?? do these make sense
+ 
 
 Verify:
 proper GC
 refcounts
+ subclassability
 
 Things dropped because they bug me:

AltStyle によって変換されたページ (->オリジナル) /