This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author taleinat
Recipients Zero, epaine, gvanrossum, rhettinger, taleinat, terry.reedy
Date 2021-05-26.09:08:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1622020108.29.0.892270650744.issue37903@roundup.psfhosted.org>
In-reply-to
Content
For a wider context, besides the default REPL, I also consider two other leading REPLs: ipython and Jupyter notebooks.  They both also have clear separation of outputs from inputs, though in different ways than the standard REPL.


ipython retains similar behavior to the standard REPL in this regard, replacing the '>>>' prompts with "In [1]:", "In [2]:" etc.  It also prefixes outputs of statements with e.g. "Out[2]:", but not outputs written to stdout.  And it has additional vertical spacing between commands.

Here is a short example session:

Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: if True:
   ...:     print('Foo')
   ...: 
Foo

In [2]: beatles = ['john', 'paul', 'ringo', 'george']

In [3]: [name.capitalize() for name in beatles]
Out[3]: ['John', 'Paul', 'Ringo', 'George']


Jupyter notebooks are a different beast since their interface is browser-based rather than terminal-based, and they take more advantage of non-text graphical elements than IDLE's shell.  Inputs are done in "cells", which may contain multiple statements, and each cell its own output.  These cells are clearly visually separate from each other.  I've attached a screenshot of a similar Python 3 session in a Jupyter notebook for comparison.


Indeed, both the ipython REPL and Jupyter notebooks go further than the default REPL in differentiating outputs from inputs, using different methods.
History
Date User Action Args
2021-05-26 09:08:28taleinatsetrecipients: + taleinat, gvanrossum, rhettinger, terry.reedy, Zero, epaine
2021-05-26 09:08:28taleinatsetmessageid: <1622020108.29.0.892270650744.issue37903@roundup.psfhosted.org>
2021-05-26 09:08:28taleinatlinkissue37903 messages
2021-05-26 09:08:27taleinatcreate