Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update example to be runnable
  • Loading branch information
hugovk committed Sep 18, 2026
commit e5b27ab79b9fcd82c6b325c294015e04e6448d7b
5 changes: 4 additions & 1 deletion Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,9 @@ Improved error messages

.. code-block:: python

from dataclasses import dataclass
from math import pi

@dataclass
class Circle:
radius: float
Expand All @@ -651,7 +654,7 @@ Improved error messages
.. code-block:: pytb

Traceback (most recent call last):
File "/home/pablogsal/github/python/main/lel.py", line 42, in <module>
File "example.py", line 18, in <module>
print(container.area)
^^^^^^^^^^^^^^
AttributeError: 'Container' object has no attribute 'area'. Did you mean '.inner.area' instead of '.area'?
Expand Down