From 2484f772b37ee2eec71449f81c62847294c1a762 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Tue, 15 Dec 2020 18:01:01 +0800 Subject: [PATCH] fixed typo --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4fb72d8..0b1f861 100644 --- a/README.md +++ b/README.md @@ -106,13 +106,13 @@ class Derived(Base): def foo(self) -> int: return 2 -def bar(x: [Base]) -> int: +def bar(x: list[Base]) -> int: sum = 0 for v in x: sum += v.foo() return sum -# incorrect, the type signature of the list is `[virtual[Base]]` +# incorrect, the type signature of the list is `list[virtual[Base]]` bar([Base(), Derived()]) ``` @@ -124,7 +124,7 @@ inlining etc. Example: ```py -def bar2(x: [virtual[Base]]) -> int: +def bar2(x: list[virtual[Base]]) -> int: sum = 0 for v in x: sum += v.foo()