[3.7] bpo-35931: Gracefully handle SyntaxError in pdb debug command (GH-11782) by miss-islington · Pull Request #11886 · python/cpython
…GH-11782) Previously, `debug print(` would cause the interpreter to exit on a SyntaxError whereas `print(` would properly display the error and return to the pdb prompt. This patch fixes this by pre-compiling the code before passing it to `Pdb.run`. https://bugs.python.org/issue35931 (cherry picked from commit 4327705) Co-authored-by: Daniel Hahler <github@thequod.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters