homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag
Type: enhancement Stage: needs patch
Components: Interpreter Core Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, aliles, benjamin.peterson, kristjan.jonsson, nanjekyejoannah, ncoghlan
Priority: low Keywords:

Created on 2012年12月09日 06:34 by ncoghlan, last changed 2022年04月11日 14:57 by admin.

Messages (3)
msg177199 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2012年12月09日 06:34
code.InteractiveConsole.push attempts to support multi-line input when using an input method that doesn't reliably split on newlines.
This support fails as soon as the multi-line input contains multiple statements (including when the last statement is incomplete).
However, switching to 'exec' instead of 'single' causes other problems - specifically, it turns off the expression printing.
While expression printing could be implied by the PyCF_DONT_IMPLY_DEDENT flag in addition to the "single" evaluation mode, it seems cleaner to break out the expression printing behaviour into its own flag and setting it appropriately in the code and/or codeop modules.
msg177223 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2012年12月09日 15:29
I'm sort of surprised "single" doesn't handle that already. Should it not?
msg177245 - (view) Author: Alyssa Coghlan (ncoghlan) * (Python committer) Date: 2012年12月09日 22:46
Not when the string is provided as one big block of text. I haven't checked
yet if including a blank line after compound statements makes a difference,
though.
History
Date User Action Args
2022年04月11日 14:57:39adminsetgithub: 60853
2019年12月01日 12:13:25BTaskayasetnosy: + BTaskaya
2019年09月09日 02:52:27nanjekyejoannahsetnosy: + nanjekyejoannah
2012年12月09日 22:46:07ncoghlansetmessages: + msg177245
2012年12月09日 15:29:10benjamin.petersonsetmessages: + msg177223
2012年12月09日 06:37:41ncoghlanlinkissue7741 dependencies
2012年12月09日 06:36:46ncoghlansettype: enhancement
stage: needs patch
2012年12月09日 06:36:30ncoghlansettitle: Add a PyCF_PRINT_EXPRESSION_RESULTS flag -> Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag
2012年12月09日 06:34:59ncoghlansetnosy: + benjamin.peterson
2012年12月09日 06:34:28ncoghlancreate

AltStyle によって変換されたページ (->オリジナル) /