New submission from Malcolm Smith: The standard interpreter is more eager to give an error on incomplete input, while the InteractiveConsole will keep on prompting for more:
Python 3.5.3 (default, Apr 10 2017, 07:53:16) [GCC 6.3.0 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> try: ... File "<stdin>", line 2 ^ IndentationError: expected an indented block >>> import code >>> code.interact() Python 3.5.3 (default, Apr 10 2017, 07:53:16) [GCC 6.3.0 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> try: ... ... ... ... The InteractiveConsole isn't totally wrong here, because after all, a blank line in this position is syntactically correct. But the inconsistency is confusing. ---------- components: Library (Lib) messages: 300230 nosy: Malcolm Smith priority: normal severity: normal status: open title: Blank line inconsistency between InteractiveConsole and standard interpreter type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue31196> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com