Skip to content

gh-130167: Improve the error case for textwrap.dedent #132666

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

Merged
merged 5 commits into from
Apr 19, 2025

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Apr 18, 2025

@hroncok
Copy link
Contributor

hroncok commented Apr 18, 2025

Would it be possible to add a test for this?

@hroncok
Copy link
Contributor

hroncok commented Apr 18, 2025

Thanks. I suppose bytes would still TypeError implicitly, right?

@AA-Turner
Copy link
Member Author

Yes, but with an error message from bytes.split. I've pushed an improvement.

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Out of curiosity, can we have the benchmarks for this change on empty strings? I don't think we lose much but I'm just curious.

@AA-Turner
Copy link
Member Author

I won't have time in the near future to run benchmarks.

A

@AA-Turner AA-Turner merged commit e7c5f60 into python:main Apr 19, 2025
43 checks passed
@AA-Turner AA-Turner deleted the fix-textwrap-error branch April 19, 2025 15:18
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.

3 participants