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()