We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18ac1a2 commit 75ed2c7Copy full SHA for 75ed2c7
peps/pep-0589.rst
@@ -437,15 +437,15 @@ Discussion:
437
x: int
438
y: str
439
440
- def f(a: A) -> None:
441
- a['y'] = 1
+ def f(a: A) -> None:
+ a['y'] = 1
442
443
- def g(b: B) -> None:
444
- f(b) # Type check error: 'B' incompatible with 'A'
+ def g(b: B) -> None:
+ f(b) # Type check error: 'B' incompatible with 'A'
445
446
- c: C = {'x': 0, 'y': 'foo'}
447
- g(c)
448
- c['y'] + 'bar' # Runtime error: int + str
+ c: C = {'x': 0, 'y': 'foo'}
+ g(c)
+ c['y'] + 'bar' # Runtime error: int + str
449
450
* A TypedDict isn't consistent with any ``Dict[...]`` type, since
451
dictionary types allow destructive operations, including
0 commit comments