Message201693
I had some problems using itertools.tee function. Fortunately I found the following advice on the PEP-323:
"Currently, the copied iterators remaintied to the original iterator. If the original advances, then so do all of the copies. Good practice is to overwrite the original So THAT anamolies do result: a, b = t (a)."
I believe that such advice should be in the documentation as well:
"Currently, the copied iterators remaintied to the original iterator. If the original advances, then so do all of the copies and vice versa. Good practice is to overwrite the original So THAT anamolies do result: a, b = t (a ). "
Note that I added "and vice versa". |
|
Date |
User |
Action |
Args |
2013-10-29 22:55:33 | Alan.Cristhian | set | recipients:
+ Alan.Cristhian, docs@python |
2013-10-29 22:55:33 | Alan.Cristhian | set | messageid: <1383087333.66.0.191656186181.issue19441@psf.upfronthosting.co.za> |
2013-10-29 22:55:33 | Alan.Cristhian | link | issue19441 messages |
2013-10-29 22:55:33 | Alan.Cristhian | create | |
|