While building examples for a talk I’ll give about “new stuff in py 3.14 and 3.15”, I found that the Python 3.14 that comes with the system (Ubuntu 26.04.1) and Python3.15 that I installed through Deadsnakes PPA don’t show spelling suggestions:
>>> [].apend(3)
...
AttributeError: 'list' object has no attribute 'apend'
However both an old Python3.10 and a compiled from main 3.16 do:
>>> [].apend(3)
...
AttributeError: 'list' object has no attribute 'apend'. Did you mean: 'append'?
For the more recent improvement it’s similar, not showing the suggestion in my 3.14 and 3.15:
>>> whille True:
...
SyntaxError: invalid syntax
But it’s there in 3.16:
>>> whille True:
...
SyntaxError: invalid syntax. Did you mean 'while'?
Do we have those builds broken somehow? There’s something else to be installed in my system? Something weirder is going on? Thanks!
I do get the expected spelling suggestions with Python 3.15 on macOS, installed with the official installer:
Python 3.15.2 (v3.15.2:5e58eaad7c5, Oct 25 2026, 14:19:34) [Clang 21.0.0 (clang-2100.1.1.101)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> [].apend(3)
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
[].apend(3)
^^^^^^^^
AttributeError: 'list' object has no attribute 'apend'. Did you mean '.append' instead of '.apend'?
>>> whille True:
File "<python-input-1>", line 1
whille True:
^^^^^^
SyntaxError: invalid syntax. Did you mean 'while'?
Ah, it’s a good idea to show exactly the build. So, for example:
$ python3.14
Python 3.14.4 (main, Aug 20 2026, 10:41:58) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> [].apend(3)
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
[].apend(3)
^^^^^^^^
AttributeError: 'list' object has no attribute 'apend'
>>>
$ python3.15
Python 3.15.2 (main, Oct 26 2026, 15:27:56) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> whille True:
File "<python-input-0>", line 1
whille True:
^
SyntaxError: invalid syntax
>>>
Python 3.14.4 (main, Aug 20 2026, 10:41:58) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> [].apend(3)
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
[].apend(3)
^^^^^^^^
AttributeError: 'list' object has no attribute 'apend'. Did you mean: 'append'?
>>> whille True:
File "<python-input-1>", line 1
whille True:
^^^^^^
SyntaxError: invalid syntax. Did you mean 'while'?
Also get them after adding 3.15 via deadsnakes to the same container:
Python 3.15.2 (main, Oct 26 2026, 15:27:56) [GCC 15.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> [].apend(3)
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
[].apend(3)
^^^^^^^^
AttributeError: 'list' object has no attribute 'apend'. Did you mean '.append' instead of '.apend'?
>>> whille True:
File "<python-input-1>", line 1
whille True:
^^^^^^
SyntaxError: invalid syntax. Did you mean 'while'?
Seems like something in your system? Does running Python with -I (“isolate Python from the user’s environment (implies -E, -P and -s)”) make a difference?