Tal Einat <[email protected]> added the comment:
> For teaching purposes in live demos, it is essential to have a clear visual
> distinction between the inputs and outputs:
>
> >>> beatles = ['john', 'paul', 'ringo', 'george']
> >>> [name.capitalize() for name in beatles]
> ['John', 'Paul', 'Ringo', 'George']
> >>> [name for name in beatles if 'n' in name]
> ['john', 'ringo']
Thanks for bringing this up. Lack of clear separation of inputs and outputs
could be considered a drawback of putting prompts in a sidebar.
Considering that the prompts *are not part of the code*, I do believe
separating them more clearly is a benefit. To support this, consider that in
Jupyter notebooks, the prompts are also placed in a graphically-separated area
to the left of both input and output "cells".
Also, do note that IDLE colors outputs differently from inputs, which helps
differentiate them from inputs very clearly IMO. Therefore, the examples in
messages posted here are lacking in this regard. For context, I'm attaching an
image with screenshots before and after the change to use a sidebar.
Also, consider that previously, separation of outputs from inputs was not great
for multi-line statements, as indentation was inconsistent and more vertical
space was used:
>>> if True:
print('Foo')
else:
print('Bar')
Foo
I think that moving prompts into a sidebar is an improvement in this regard:
>>>| if True:
...| print('Foo')
...| else:
...| print('Bar')
...|
| Foo
Taking these three points together, I the sidebar clearly improves the
separation of prompts from actual code, and the differentiation of outputs from
inputs does not seem much worse, and is arguably overall better.
----------
Added file: https://bugs.python.org/file50065/IDLE shell befoe and after
sidebar.png
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue37903>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com