gh-142035: Textwrap without ansi escapes#142040
Conversation
21b7359 to
6517434
Compare
November 28, 2025 14:46
|
This is just a POC, it needs tests, docs, etc. >>> textwrap.wrap("Cafe\u0301 is good", width=4)
['Cafe', '́ is', 'good'] |
Sorry, something went wrong.
|
Sorry but we should not change |
Sorry, something went wrong.
|
Oh actually the patch is quite simple. However as it's a new feature we cannot backport it =/ so we need to think of a solution that can be backported. If it's not possible I would suggest:
If the PR is not ready, I will make it a draft. |
Sorry, something went wrong.
|
Thanks for the reply! I was not thinking about backporting the changes to 3.14 to be honest. The cleanest solution would be to incorporate a complete unicode handling with a technique similar to wcwidth, that would allow for proper wrapping of all glyphs. That being said, as this would be indeed a major addition to stdlib, a good first step might be to add the new option to |
Sorry, something went wrong.
|
Well.. looks like the current tests are broken which is not good. I need to think about the changes to @serhiy-storchaka Do you think it makes sense to make |
Sorry, something went wrong.
|
Sorry, the draft contained a bug due to a copy paste error, I just pushed a fix. |
Sorry, something went wrong.
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
edited by bedevere-app
Bot
LoadingUh oh!
There was an error while loading. Please reload this page.
Copy link Copy MarkdownSorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.