]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-137967: Fix "Whats New" doc example (#138028)
authorsobolevn <mail@sobolevn.me>
Thu, 21 Aug 2025 17:48:40 +0000 (20:48 +0300)
committerGitHub <noreply@github.com>
Thu, 21 Aug 2025 17:48:40 +0000 (17:48 +0000)
Doc/whatsnew/3.15.rst

index eaaf1b9966bc724997f84922307e152706d9342e..7748c172e63b6dd4f55f2bcc08cc663537750b5e 100644 (file)
@@ -190,11 +190,11 @@ Improved error messages
            return pi * self.radius**2
 
      class Container:
-        def __init__(self, inner: Any) -> None:
+        def __init__(self, inner: Circle) -> None:
            self.inner = inner
 
-     square = Square(side=4)
-     container = Container(square)
+     circle = Circle(radius=4.0)
+     container = Container(circle)
      print(container.area)
 
   Running this code now produces a clearer suggestion: