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