Skip to content

Conversation

@eendebakpt
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

@eendebakpt eendebakpt force-pushed the refactor/bytearray_strip branch from 1a70230 to 755c495 Compare March 25, 2022 09:39
Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Choose a reason for hiding this comment

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

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

The Python-visible API probably shouldn't change.

@eendebakpt
Copy link
Contributor Author

@sweeneyde Can you review again? Thanks

Copy link
Member

@sweeneyde sweeneyde left a comment

Choose a reason for hiding this comment

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

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

@peendebak
Copy link
Contributor

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

@sweeneyde
Copy link
Member

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
@sweeneyde sweeneyde merged commit 355cbaa into python:main Apr 14, 2022
@eendebakpt eendebakpt mannequin mentioned this pull request Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants