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.
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:39 | admin | set | github: 60853 |
| 2019年12月01日 12:13:25 | BTaskaya | set | nosy:
+ BTaskaya |
| 2019年09月09日 02:52:27 | nanjekyejoannah | set | nosy:
+ nanjekyejoannah |
| 2012年12月09日 22:46:07 | ncoghlan | set | messages: + msg177245 |
| 2012年12月09日 15:29:10 | benjamin.peterson | set | messages: + msg177223 |
| 2012年12月09日 06:37:41 | ncoghlan | link | issue7741 dependencies |
| 2012年12月09日 06:36:46 | ncoghlan | set | type: enhancement stage: needs patch |
| 2012年12月09日 06:36:30 | ncoghlan | set | title: Add a PyCF_PRINT_EXPRESSION_RESULTS flag -> Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag |
| 2012年12月09日 06:34:59 | ncoghlan | set | nosy:
+ benjamin.peterson |
| 2012年12月09日 06:34:28 | ncoghlan | create | |