From 05fb81b2c07595eaabe76cb7a37646053114009b Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 9 Apr 2025 23:34:34 +0500 Subject: [PATCH] PEP589: fix indentation issue with one of the example snippets See the screenshot - https://i.imgur.com/0lpo6a8.png --- peps/pep-0589.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/peps/pep-0589.rst b/peps/pep-0589.rst index 194df0fd5f6..ad3fcc038ca 100644 --- a/peps/pep-0589.rst +++ b/peps/pep-0589.rst @@ -437,15 +437,15 @@ Discussion: x: int y: str - def f(a: A) -> None: - a['y'] = 1 + def f(a: A) -> None: + a['y'] = 1 - def g(b: B) -> None: - f(b) # Type check error: 'B' incompatible with 'A' + def g(b: B) -> None: + f(b) # Type check error: 'B' incompatible with 'A' - c: C = {'x': 0, 'y': 'foo'} - g(c) - c['y'] + 'bar' # Runtime error: int + str + c: C = {'x': 0, 'y': 'foo'} + g(c) + c['y'] + 'bar' # Runtime error: int + str * A TypedDict isn't consistent with any ``Dict[...]`` type, since dictionary types allow destructive operations, including