mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
_ellipsis_match(): Removed special-casing of "...\n". The semantics
are non-obvious either way because the newline character "is invisible", but it's still there all the same, and it's easier to explain/predict if that reality is left alone.
This commit is contained in:
parent
5268c3955a
commit
e594bee535
2 changed files with 5 additions and 32 deletions
|
@ -398,10 +398,6 @@ def _ellipsis_match(want, got):
|
|||
"""
|
||||
if ELLIPSIS_MARKER not in want:
|
||||
return want == got
|
||||
# Remove \n from ...\n, else the newline will be required,
|
||||
# and (for example) ... on a line by itself can't match
|
||||
# nothing gracefully.
|
||||
want = want.replace(ELLIPSIS_MARKER + '\n', ELLIPSIS_MARKER)
|
||||
|
||||
# Find "the real" strings.
|
||||
ws = want.split(ELLIPSIS_MARKER)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue