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 0755a61 commit fabe37fCopy full SHA for fabe37f
docs/source/generics.rst
@@ -630,7 +630,7 @@ Let us illustrate this by few simple examples:
630
631
my_circles: list[Circle] = []
632
add_one(my_circles) # This may appear safe, but...
633
- my_circles[-1].rotate() # ...this will fail, since my_circles[0] is now a Shape, not a Circle
+ my_circles[0].rotate() # ...this will fail, since my_circles[0] is now a Shape, not a Circle
634
635
Another example of invariant type is ``dict``. Most mutable containers
636
are invariant.
0 commit comments