https://github.com/python/cpython/commit/ba8e20b5f2b6bcda188ff00b599d187e985125e2
commit: ba8e20b5f2b6bcda188ff00b599d187e985125e2
branch: main
author: sobolevn <[email protected]>
committer: pablogsal <[email protected]>
date: 2025-08-21T17:48:40Z
summary:
gh-137967: Fix "Whats New" doc example (#138028)
files:
M Doc/whatsnew/3.15.rst
diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst
index eaaf1b9966bc72..7748c172e63b6d 100644
--- a/Doc/whatsnew/3.15.rst
+++ b/Doc/whatsnew/3.15.rst
@@ -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:
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]