ipython / ipython/ipython

Incorrect parsing when executing %debug print('m n')

Open
#8,136 1 comment 0 reactions 0 assignees View on GitHub
core
Dominant language
Python
Stars
16.8k
Forks
4.5k
Avg merge
1d 2h
Merged PRs (30d)
6

Description

II ran into this issue with a more complicated command and distilled it to this testcase. Other print commands, for example `%debug print('mn')` without the space can be debugged. Also, any other function instead of `print` yields the same result:

```
$ sage -ipython
Python 2.7.8 (default, Feb 15 2015, 03:39:19)
Type "copyright", "credits" or "license" for more information.

IPython 3.0.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.

In [1]: %debug print('m n')
NOTE: Enter 'c' at the ipdb> prompt to continue execution.
---------------------------------------------------------------------------
SyntaxError Traceback (most recent call last)
SyntaxError: EOL while scanning string literal (, line 1)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.