| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
… start of a continuation line (pythonGH-157693) `pyparse._synchre` took any line starting with `else` or `yield` for the start of a statement, so the parenthesis containing a conditional expression or a yield expression continued on such a line (`(1 if x\n else 0)`, `(\n yield x)`) was not found by Show Surrounding Parens. An `else` statement is always followed by a colon, a conditional expression never, so `else` now counts as a statement start only when followed by `:`. A `yield` statement cannot be told from a yield expression, so `yield` is removed from the list; it only served to shorten the parsed text. On the other hand, `with`, `del`, `global`, `nonlocal`, `pass` and `finally`, which cannot start a continuation line, are added. (cherry picked from commit 2073473) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
| Back | FazBrowse Home | New Git URL |
pyparse._synchre took any line starting with else or yield for the start of a statement, so the parenthesis containing a conditional expression or a yield expression continued on such a line ((1 if x\n else 0), (\n yield x)) was not found by Show Surrounding Parens. An else statement is always followed by a colon, a conditional expression never, so else now counts as a statement start only when followed by :. A yield statement cannot be told from a yield expression, so yield is removed from the list; it only served to shorten the parsed text. On the other hand, with, del, global, nonlocal, pass and finally, which cannot start a continuation line, are added.
(cherry picked from commit 2073473)
Co-authored-by: Serhiy Storchaka storchaka@gmail.com