fuckingpython.lol

Python errors › What is new

New error messages in Python 3.15

Updated

Python 3.15.0 was released on 9 October 2026, and 3.15.1 followed on 21 October. In 3.15 the error messages change in one place, AttributeError, which now suggests more fixes. Each example below ran on 3.14 and on 3.15, and shows what each printed.

An attribute that lives on an inner object

When the attribute you asked for does not exist, but one of the object's own attributes has it, 3.15 suggests the path to it.

main.py
from dataclasses import dataclass
from math import pi

@dataclass
class Circle:
    radius: float

    @property
    def area(self) -> float:
        return pi * self.radius ** 2

class Container:
    def __init__(self, inner: Circle) -> None:
        self.inner = inner

container = Container(Circle(radius=4.0))
print(container.area)
Python 3.15 prints
Traceback (most recent call last):
  File "/home/me/project/main.py", line 17, in <module>
    print(container.area)
          ^^^^^^^^^^^^^^
AttributeError: 'Container' object has no attribute 'area'. Did you mean '.inner.area' instead of '.area'?
PythonPrints
3.14AttributeError: 'Container' object has no attribute 'area'
3.15AttributeError: 'Container' object has no attribute 'area'. Did you mean '.inner.area' instead of '.area'?

Run on CPython 3.14.9 and 3.15.1, on October 25, 2026.

Method names from other languages

When a builtin type has no attribute with a close spelling, 3.15 checks a table of common method names from JavaScript, Java, Ruby and C# and names the Python equivalent. Where Python uses syntax instead of a method, the hint shows the syntax, as with "Use d[k] = v." for a dict.

main.py
items = [1, 2, 3]
items.push(4)

The same check turns "ada".toUpperCase() into "Did you mean '.upper'?" and ages.put("ada", 36) into "Use d[k] = v."; the page on 'list' object has no attribute runs those too.

Python 3.15 prints
Traceback (most recent call last):
  File "/home/me/project/main.py", line 2, in <module>
    items.push(4)
    ^^^^^^^^^^
AttributeError: 'list' object has no attribute 'push'. Did you mean '.append'?
PythonPrints
3.14AttributeError: 'list' object has no attribute 'push'
3.15AttributeError: 'list' object has no attribute 'push'. Did you mean '.append'?

Run on CPython 3.14.9 and 3.15.1, on October 25, 2026.

A list method on a tuple

Calling a method that changes a sequence on one that cannot change now points to the mutable type.

main.py
point = (1, 2, 3)
point.append(4)
Python 3.15 prints
Traceback (most recent call last):
  File "/home/me/project/main.py", line 2, in <module>
    point.append(4)
    ^^^^^^^^^^^^
AttributeError: 'tuple' object has no attribute 'append'. Did you mean to use a 'list' object?
PythonPrints
3.14AttributeError: 'tuple' object has no attribute 'append'
3.15AttributeError: 'tuple' object has no attribute 'append'. Did you mean to use a 'list' object?

Run on CPython 3.14.9 and 3.15.1, on October 25, 2026.

Suggestions when deleting an attribute

del obj.name with a misspelt name now gets a "Did you mean" suggestion too, as reading a misspelt attribute has since 3.10.

main.py
class Settings:
    pass

s = Settings()
s.colour = "red"
del s.color
Python 3.15 prints
Traceback (most recent call last):
  File "/home/me/project/main.py", line 6, in <module>
    del s.color
        ^^^^^^^
AttributeError: 'Settings' object has no attribute 'color'. Did you mean '.colour' instead of '.color'?
PythonPrints
3.14AttributeError: 'Settings' object has no attribute 'color'
3.15AttributeError: 'Settings' object has no attribute 'color'. Did you mean '.colour' instead of '.color'?

Run on CPython 3.14.9 and 3.15.1, on October 25, 2026.

Wording fixes

Several messages that said "argument" where they meant "parameter", or the other way round, were corrected. The What's New list does not name them one by one.

Sources

Read on October 25, 2026.