[issue32939] IDLE: self.use_context_ps1 defined in editor, but always False

Terry J. Reedy report at bugs.python.org
Sat Feb 24 23:11:11 EST 2018


Terry J. Reedy <tjreedy at udel.edu> added the comment:

#31858 (second link) replaced one (?) use of "if use_context_ps1" ('in Shell') with "if self.last_prompt_line != ''" ("prompt before code on same line").  This can only happen in Shell, and only if the prompt ends with something other than '\n'.

I cannot remember whether intentionally removing use_context_ps1 = True, but I may have found that it improved behavior in some case and may have intended to followup but have not yet.  Part of the problem is that smart indents do not work right in the shell, and if they did, they would be wrong as soon as one copied code from shell to editor.

Before merging "I tested the patch manually in both shell and editor with both the default prompt and with sys.ps1 set before importing idlelib.idle."  But I did not write out what I did and what the results were.

The immediate issue is to decide whether to do nothing, revert the removal, or change the editor code, and document why.  Fresh knowledge of pyparse should help.

----------
type: enhancement -> 

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32939>
_______________________________________


More information about the Python-bugs-list mailing list