Visitar URL original
gh-56708: support custom len function in textwrap.wrap by xi · Pull Request #28136 · python/cpython · GitHub
Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup
  • Loading branch information
xi committed Oct 13, 2021
commit 68e8098a68a952ddca55981abefb8b159c4b2bcf
2 changes: 1 addition & 1 deletion Lib/test/test_textwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ def test_first_word_too_long_but_placeholder_fits(self):

class WideCharacterTestCase(BaseTestCase):
def text_len(self, text):
sum(
return sum(
2 if unicodedata.east_asian_width(c) in {'F', 'W'} else 1
for c in text
)
Expand Down