#14959·ipython

Unexpected input continuation with incomplete floating point input

Author: WarrenWeckesserCreated Aug 13, 2025Updated Aug 16, 2026

When I type 1e- and hit enter, I get a continuation prompt:

In [1]: 1e-
   ...: 
   ...: 0
   ...: plate of shrimp
   ...: ...
   ...: etc
   ...: 

Any incomplete floating point number triggers the behavior, e.g. 123.45E+. It also happens when there are spaces after the + or -, and that space can be followed by anything:

In [2]: 123.45E+   plate of shrimp
   ...: ]});
   ...: ?
   ...: 

I expected a syntax error.

IPython info:

$ python3 -c "import IPython; print(IPython.sys_info())"
{'commit_hash': '67f7d8b8b',
 'commit_source': 'installation',
 'default_encoding': 'utf-8',
 'ipython_path': '/home/warren/py3.13.5/lib/python3.13/site-packages/IPython',
 'ipython_version': '9.4.0',
 'os_name': 'posix',
 'platform': 'Linux-6.12.10-76061203-generic-x86_64-with-glibc2.35',
 'sys_executable': '/home/warren/py3.13.5/bin/python3',
 'sys_platform': 'linux',
 'sys_version': '3.13.5 (main, Jul 15 2025, 14:50:34) [GCC 11.4.0]'