diff options
Diffstat (limited to 'Lib/_pyrepl/readline.py')
-rw-r--r-- | Lib/_pyrepl/readline.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_pyrepl/readline.py b/Lib/_pyrepl/readline.py index dfacfd84999..a6ef138e8b4 100644 --- a/Lib/_pyrepl/readline.py +++ b/Lib/_pyrepl/readline.py @@ -249,7 +249,7 @@ def _should_auto_indent(buffer: list[str], pos: int) -> bool: while pos > 0: pos -= 1 if last_char is None: - if buffer[pos] not in " \t\n": # ignore whitespaces + if buffer[pos] not in " \t\n#": # ignore whitespaces and comments last_char = buffer[pos] else: # even if we found a non-whitespace character before |