mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Minor updates:
* Updated comment on design of imap() * Added untraversed object in izip() structure * Replaced the pairwise() example with a more general window() example
This commit is contained in:
parent
3a8fbe7eec
commit
befa37dd05
3 changed files with 38 additions and 12 deletions
|
@ -882,7 +882,7 @@ the following reasons:
|
|||
None.
|
||||
|
||||
4) If a need does arise, it can be met by __builtins__.map() or by
|
||||
writing a generator.
|
||||
writing: chain(iterable, repeat(None)).
|
||||
|
||||
5) Similar toolsets in Haskell and SML do not have automatic None fill-in.
|
||||
*/
|
||||
|
@ -1574,8 +1574,18 @@ izip_dealloc(izipobject *lz)
|
|||
static int
|
||||
izip_traverse(izipobject *lz, visitproc visit, void *arg)
|
||||
{
|
||||
if (lz->ittuple)
|
||||
return visit(lz->ittuple, arg);
|
||||
int err;
|
||||
|
||||
if (lz->ittuple) {
|
||||
err = visit(lz->ittuple, arg);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
if (lz->result) {
|
||||
err = visit(lz->result, arg);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue