Skip to content

escaped parentheses cause issues in reticulate REPL #1259

@kevinushey

Description

@kevinushey

For example, if I try to submit the following code to the reticulate REPL:

while False:
  '\('

I see:

>>> while False:
...   '\('
IndentationError: expected an indented block after 'while' statement on line 1 (<string>, line 1)
IndentationError: unexpected indent (<string>, line 1)

Alternatively;

> reticulate::repl_python(input = "while False:\n\t'\\('\n")
Python 3.10.4 (C:/Users/kevin/AppData/Local/Programs/Python/Python310/python.exe)
Reticulate 1.25 REPL -- A Python interpreter in R.
Enter 'exit' or 'quit' to exit the REPL and return to R.
>>>  while False:
...  	'\('
IndentationError: expected an indented block after 'while' statement on line 1 (<string>, line 1)
IndentationError: unexpected indent (<string>, line 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions