Skip to content
Snippets Groups Projects
  • Li Weiwei's avatar
    3e6ab821
    py/repl: Fix handling of unmatched brackets and unfinished quotes. · 3e6ab821
    Li Weiwei authored
    Before this patch:
    
        >>> print(')
        ... ')
        Traceback (most recent call last):
          File "<stdin>", line 1
        SyntaxError: invalid syntax
    
    After this patch:
    
        >>> print(')
        Traceback (most recent call last):
          File "<stdin>", line 1
        SyntaxError: invalid syntax
    
    This matches CPython and prevents getting stuck in REPL continuation when a
    1-quote is unmatched.
    3e6ab821
    History
    py/repl: Fix handling of unmatched brackets and unfinished quotes.
    Li Weiwei authored
    Before this patch:
    
        >>> print(')
        ... ')
        Traceback (most recent call last):
          File "<stdin>", line 1
        SyntaxError: invalid syntax
    
    After this patch:
    
        >>> print(')
        Traceback (most recent call last):
          File "<stdin>", line 1
        SyntaxError: invalid syntax
    
    This matches CPython and prevents getting stuck in REPL continuation when a
    1-quote is unmatched.