Skip to content

Conversation

@rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Sep 25, 2024

  • Eliminates the code path that reused a tee object input as part of the output.
  • Updated the rough equivalent recipe to have better fidelity to the actual C code.
  • Removed a note about using the tee input. It is generically true of all iterator pass throughs and the note made it seem like a caution specific to tee where a tee-of-a-tee is the exception to the rule.

📚 Documentation preview 📚: https://cpython-previews--124490.org.readthedocs.build/

@rhettinger rhettinger added type-bug An unexpected behavior, bug, or error needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Sep 25, 2024
Copy link
Member

@ericvsmith ericvsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the one noted nit, this all looks good to me. I verified the "roughly equivalent" code, but not the code in test_itertools.py (I figure the test suite will do that job).

@rhettinger rhettinger merged commit 909c6f7 into python:main Sep 25, 2024
@miss-islington-app
Copy link

Thanks @rhettinger for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @rhettinger, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 909c6f718913e713c990d69e6d8a74c05f81e2c2 3.13

@miss-islington-app
Copy link

Sorry, @rhettinger, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 909c6f718913e713c990d69e6d8a74c05f81e2c2 3.12

emilyemorehouse added a commit to lysnikolaou/cpython that referenced this pull request Sep 26, 2024