From 026c3e9cc466a4b7157fc337bf6800a4d144c3ac Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 25 Apr 2023 09:16:05 -0700 Subject: [3.11] gh-91687: modernize dataclass example typing (GH-103773) (#103774) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit modernize dataclass example typing `list` rather than `List` and comment as to that line being the alluded too error. (cherry picked from commit 7ef614c1adad2b8857442bf0fea649891b591109) Co-authored-by: Allan Lago <35788148+alago1@users.noreply.github.com> Co-authored-by: Ɓukasz Langa --- Doc/library/dataclasses.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index 0a34b99..58bf96b 100644 --- a/Doc/library/dataclasses.rst +++ b/Doc/library/dataclasses.rst @@ -712,7 +712,7 @@ Using dataclasses, *if* this code was valid:: @dataclass class D: - x: List = [] + x: list = [] # This code raises ValueError def add(self, element): self.x += element -- cgit v0.12