cpython
cpython copied to clipboard
gh-128213: fast path for bytes creation from list and tuple
Continuation of #128214. This PR
- Improves performance of bytes creation from a list or tuple
- Fixes a free-threading bug
- Reduces some duplicated code between list and tuple handling
- Issue: gh-128213