[New-bugs-announce] [issue35610] IDLE: replace use of EditorWindow.context_use_ps1

Terry J. Reedy report at bugs.python.org
Sat Dec 29 00:02:31 EST 2018


New submission from Terry J. Reedy <tjreedy at udel.edu>:

Attribute .context_use_ps1 is False in EditorWindow and Outwin, True in PyShell.  It is use to switch code paths in multiple classes.  It is equal to isinstance(self/editwin, PyShell) (which requires an import).  It has the same truth value as attribute .prompt_last_line, which is '' except in PyShell.  This more informative attribute was added in #31858 to consolidate all PS1 handling in PyShell.

A PR for #34055 proposed to remove the setting of .context_use_ps1 and the uses with .prompt_last_line.  I will change the title after I submit this.  I am not yet sure if this is the change I want to make.

----------
assignee: terry.reedy
components: IDLE
messages: 332700
nosy: cheryl.sabella, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: IDLE: replace use of EditorWindow.context_use_ps1
type: enhancement
versions: Python 3.7, Python 3.8

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


More information about the New-bugs-announce mailing list