This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients Alan.Cristhian, docs@python, rhettinger
Date 2013-11-06.20:36:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I don't want to recommend overwriting the variable name but will add a note for the rest:

"Copied iterators depend the original iterator. If the original advances, then so do the copies.  After teeing the iterators, the usual practice is
to stop working with the original iterator and operate only on the new tee-ed iterators."

FWIW, the situation is analogous to str.upper().  We note that string methods produce new strings.  We don't state that a best practice is to overwrite the variable with "s = s.upper()".  That is sometimes what you want and sometimes not.
Date User Action Args
2013-11-06 20:36:15rhettingersetrecipients: + rhettinger, docs@python, Alan.Cristhian
2013-11-06 20:36:15rhettingersetmessageid: <>
2013-11-06 20:36:15rhettingerlinkissue19441 messages
2013-11-06 20:36:14rhettingercreate