From 007e5e6985801ecb8b70e4f6078a786dba330b00 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 11 Dec 2023 00:32:24 -0800 Subject: [PATCH] Typing Spec: Don't prescribe using joins (#1538) --- 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