From 997fd7d57cfa6461f7534805a3c368907ca6cf46 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Sun, 2 Aug 2020 14:50:14 -0700 Subject: [PATCH] More docs improvements. --- docs/internals.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/internals.md b/docs/internals.md index 1e553fbe4..d005c6cc0 100644 --- a/docs/internals.md +++ b/docs/internals.md @@ -57,10 +57,10 @@ In this example, the type evaluator knows that parameter a is either None, str, Narrowing is also applied values are assigned to a variable. ```python -def func(): +def func(b: Optional[Union[str, List[str]]]): # The declared type of “a” is a union of three types # (str, List[str] and None). - a: Optional[Union[str, List[str]]] + a: Optional[Union[str, List[str]]] = b reveal_type(a) # Type is `Optional[Union[str, List[str]]]` a = "hi"