Tal Einat <taleinat+pyt...@gmail.com> added the comment:

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.

----------
Added file: https://bugs.python.org/file50066/Jupyter Notebook Example 
Session.png

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37903>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to