Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-91266: refactor bytearray strip methods #32096

Merged
merged 8 commits into from Apr 14, 2022

Conversation

Copy link
Contributor

@eendebakpt eendebakpt commented Mar 24, 2022

The bytearray strip, lstrip and rstrip methods contain duplicated code. This PR refactors the three implementations to use common code.

https://bugs.python.org/issue47110

Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Test Results:
415 tests OK.

8 tests failed:
test_asyncio test_bdb test_distutils test_embed test_idle
test_ossaudiodev test_peg_generator test_venv

Looks like none relevant.

@sweeneyde
Copy link
Member

@sweeneyde sweeneyde commented Mar 26, 2022

The Python-visible API probably shouldn't change.

@eendebakpt
Copy link
Contributor Author

@eendebakpt eendebakpt commented Apr 6, 2022

@sweeneyde Can you review again? Thanks

Copy link
Member

@sweeneyde sweeneyde left a comment

We should typically be pretty conservative about refactoring PRs, but since this eliminates 45 lines, I think it makes sense.

@peendebak
Copy link

@peendebak peendebak commented Apr 12, 2022

@sweeneyde Thanks. Should I add a new entry for this?

@sweeneyde
Copy link
Member

@sweeneyde sweeneyde commented Apr 12, 2022

Sure, yes: better to err on the side of documenting everything.

@eendebakpt eendebakpt changed the title bpo-47110: refactor bytearray strip methods gh-91266: refactor bytearray strip methods Apr 13, 2022
…e-91266.6Vkzzt.rst

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
@sweeneyde sweeneyde merged commit 355cbaa into python:main Apr 14, 2022
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants