From 475a44273c0f2fa69e886f12fa55a3679fedc726 Mon Sep 17 00:00:00 2001 From: Denis Eliseev Date: Thu, 26 Aug 2021 20:33:12 +0500 Subject: [PATCH] Update type-concepts.md (#2230) --- docs/type-concepts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/type-concepts.md b/docs/type-concepts.md index 07a2099bf..6cf6b0cc1 100644 --- a/docs/type-concepts.md +++ b/docs/type-concepts.md @@ -296,4 +296,4 @@ def add_one(value: _StrOrFloat) -> _StrOrFloat: return sum ``` -Notice that the type of variable `sum` is reported with asterisks (`*`). This indicates that internally the type checker is tracking the type as conditional. In this particular example, it indicates that `sum` is a `str` type if the parameter `input` is a `str` but is a `float` if `input` is a `float`. By tracking these conditional types, the type checker can verify that the return type is consistent with the return type `_StrOrFloat`. +Notice that the type of variable `sum` is reported with asterisks (`*`). This indicates that internally the type checker is tracking the type as conditional. In this particular example, it indicates that `sum` is a `str` type if the parameter `value` is a `str` but is a `float` if `value` is a `float`. By tracking these conditional types, the type checker can verify that the return type is consistent with the return type `_StrOrFloat`.