mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-133306: Use \z instead of \Z in regular expressions in the stdlib (GH-133337)
This commit is contained in:
parent
add0ca9ea0
commit
84a08f8629
16 changed files with 23 additions and 23 deletions
|
@ -86,7 +86,7 @@ class TextWrapper:
|
|||
-(?: (?<=%(lt)s{2}-) | (?<=%(lt)s-%(lt)s-))
|
||||
(?= %(lt)s -? %(lt)s)
|
||||
| # end of word
|
||||
(?=%(ws)s|\Z)
|
||||
(?=%(ws)s|\z)
|
||||
| # em-dash
|
||||
(?<=%(wp)s) (?=-{2,}\w)
|
||||
)
|
||||
|
@ -107,7 +107,7 @@ class TextWrapper:
|
|||
sentence_end_re = re.compile(r'[a-z]' # lowercase letter
|
||||
r'[\.\!\?]' # sentence-ending punct.
|
||||
r'[\"\']?' # optional end-of-quote
|
||||
r'\Z') # end of chunk
|
||||
r'\z') # end of chunk
|
||||
|
||||
def __init__(self,
|
||||
width=70,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue