From cdcc1daac4b9277ae3001c74c26344a9aaab5958 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 10 Dec 2023 21:16:43 -0800 Subject: [PATCH] spec: less restrictive example --- docs/spec/generics.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/spec/generics.rst b/docs/spec/generics.rst index fa9947520..4e502603e 100644 --- a/docs/spec/generics.rst +++ b/docs/spec/generics.rst @@ -486,7 +486,7 @@ be a subtype of the boundary type. Example:: longer([1], [1, 2]) # ok, return type list[int] longer({1}, {1, 2}) # ok, return type set[int] - longer([1], {1, 2}) # ok, return type Collection[int] + longer([1], {1, 2}) # ok, return type a supertype of list[int] and set[int] An upper bound cannot be combined with type constraints (as used in ``AnyStr``, see the example earlier); type constraints cause the