mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-46544: Do not leak x
and uspace
in textwrap.TextWrapper (GH-30955)
This commit is contained in:
parent
08c0ed2d9c
commit
82bce54614
2 changed files with 3 additions and 4 deletions
|
@ -63,10 +63,7 @@ class TextWrapper:
|
|||
Append to the last line of truncated text.
|
||||
"""
|
||||
|
||||
unicode_whitespace_trans = {}
|
||||
uspace = ord(' ')
|
||||
for x in _whitespace:
|
||||
unicode_whitespace_trans[ord(x)] = uspace
|
||||
unicode_whitespace_trans = dict.fromkeys(map(ord, _whitespace), ord(' '))
|
||||
|
||||
# This funky little regex is just the trick for splitting
|
||||
# text up into word-wrappable chunks. E.g.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue