<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 1, 2019 at 9:24 PM Terry Reedy <<a href="mailto:tjreedy@udel.edu">tjreedy@udel.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/1/2019 6:45 PM, Guido van Rossum wrote:<br>
> If I’d known that was possible I’d have done that 2 years ago. So +1.<br>
<br>
Did you mean 20 years ago (1999), when (AFAIK) you submitted the first <br>
patches?<br></blockquote><div><br></div><div>Yes. Stupid phone "keyboard".<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
In any case, I appreciate the quick positive response from you and <br>
André.  I posted the idea for this over 5 years ago and a majority of <br>
people, including the two commenting on the current issue,<br>
<a href="https://bugs.python.org/issue37903" rel="noreferrer" target="_blank">https://bugs.python.org/issue37903</a><br>
have not been as enthusiastic (as in don't seem to have gotten why it is <br>
a great idea).<br></blockquote><div><br></div><div>It is obviously a great idea if you ever want to copy a multi-line statement from the IDLE shell to a module, since the prompt doesn't get in the way (and you will be able to use spaces instead of tabs for indentation -- apart from a few oddballs, everyone uses four spaces).<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
 > On Fri, Nov 1, 2019 at 7:37 PM Tal Einat <<a href="mailto:taleinat@gmail.com" target="_blank">taleinat@gmail.com</a>> wrote:<br>
<br>
 >> I'm attaching a screenshot to make it easy to get a feel for what is <br>
proposed.<br>
<br>
I should have mocked this years ago in my post to<br>
<a href="https://bugs.python.org/issue7676" rel="noreferrer" target="_blank">https://bugs.python.org/issue7676</a><br>
<br>
As it is, the screenshot does not yet show 8-column tab indents replaced <br>
with 4-space indents. (An immediate follow-on patch.) The following <br>
better shows this part of the goal.<br>
<br><span style="font-family:monospace">
>>>|print("Hello, world")<br>
   |Hello, world!<br>
>>>|if True:<br>
...|    if "Let's get rid of 8-space tabs!":<br>
...|        print("This indentation is just right.")<br>
...|<br>
   |This indentation is just right.</span><br>
<br>
where the strength and visibility of the vertical line depends on the OS <br>
widgets and the background colors of the sidebar and text box.<br></blockquote><div><br></div><div>What I said. <br></div><div>  <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I have more recently tried to (somewhat conservatively) 'reimagine' how <br>
the IDLE's shell should operate, following these principles:<br>
1. User code should be executed properly.  AFAIK, done.<br>
2. User code should be formatted properly (as in the editor).  This is <br>
not  true now but will be with this change and the follow-up indent change.<br>
3. Interaction should be made as easy as possible, even if it means <br>
looking or operating a bit differently from the standard REPL.  IDLE <br>
already does this somewhat, and posted ideas for follow-up changes to<br>
<a href="https://bugs.python.org/issue37892" rel="noreferrer" target="_blank">https://bugs.python.org/issue37892</a><br clear="all"></blockquote><div><br></div><div>Probably the most popular alternate REPL is IPython (whether standalone or in Jupyter Notebook) which is way different from the standard REPL anyway. So you're in good company wanting a different REPL in IDLE.</div><div><br></div><div>In issue 37903, RH appears to be requiring support for  doctests. (Interestingly, in issue 7676 he wishes the IDLE shell wouldn't use tabs, which you're going to support.) I'm a little confused by his comments about doctests. IMO copying from a "doctest" in the docs to the shell is not affected -- the problem there is purely that you have to work hard to avoid also copying the ">>>" and (especially) "..." prompts into the shell. That seems to me to be the main thing people would do with doctests, and it's unaffected. It's true that recreating a doctest from an IDLE shell session is a little harder -- but a nice fallback is to use the python binary itself, which has the exact behavior you'd want. So I don't see this as a reason not to backport. (This also seems pretty niche. I don't know if he can back up his claim that doctests have become more popular.)</div><div><br></div><div>I also don't see a reason to start supporting sys.ps1/ps2 -- I copied that feature rather mindlessly from the UNIX shell 30 years ago, and probably wouldn't have done it the same way today. (The only useful thing to do here might be to set sys.ps2="", to make copying from a shell window a little less painful. But your solution solves that much more elegantly.)<br></div></div><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div><div><i style="font-family:Arial,Helvetica,sans-serif;font-size:small;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);color:rgb(136,136,136)"><span>Pronouns</span>: he/him </i><a href="http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/" style="color:rgb(17,85,204);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255)" target="_blank"><i>(why is my <span>pronoun</span> here?)</i></a></div></div></div></div></div></div>