Uploaded image for project: 'SonarPython'
  1. SonarPython
  2. SONARPY-623

Parse error on backslash before empty line

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8
    • Component/s: None
    • Labels:
      None

      Description

      A parse error shouldn't be raised on the following code, it's valid python:

      x = 42 \
      
      print(x)
      

      The backslash escapes an empty line and the print statement is on another line.

        Attachments

          Activity

            People

            Assignee:
            pierre-yves.nicolas Pierre-Yves Nicolas
            Reporter:
            pierre-yves.nicolas Pierre-Yves Nicolas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: