commit | 4514369f27c8c81af0736782c98689457df39ed5 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Sat Oct 25 06:37:47 2003 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Sat Oct 25 06:37:47 2003 +0000 |
tree | 90a9d1bb0ce29c335c845908fde347c11b8c291d | |
parent | 23b44a39cec5ccebb6c6eb1e94eccbd6e8ce758e [diff] |
Improvements to coding for itertools.tee(): * Add error checking code to PyList_Append() call. * Replace PyObject_CallMethod(to->outbasket, "pop", NULL) with equivalent in-line code. Inlining is important here because the search for the pop method will occur for every element returned by the iterator. * Make tee's dealloc() a little smarter. If the trailing iterator is being deallocated, then the queue data is no longer needed and can be freed.