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

2018-02-24 Thread Terry J. Reedy

Terry J. Reedy  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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2018-02-24 Thread Cheryl Sabella

New submission from Cheryl Sabella :

In the EditorWindow in editor.py, there is an attribute called 
`self.context_use_ps1` that is only set to False.

Changed to an instance variable in:
https://github.com/python/cpython/commit/6af44986029c84c4c5df62a64c60a6ed978a3693
 

Removed from pyshell in:
https://github.com/python/cpython/commit/e86172d63af5827a3c2b55b80351cb38a26190eb

--
assignee: terry.reedy
components: IDLE
messages: 312727
nosy: csabella, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: self.use_context_ps1 defined in editor, but always False
type: enhancement
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com