From 46f5091c9f2e3c029d4aaecb43f95d5e01df6f30 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Thu, 18 Aug 2022 18:04:33 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=20Fix=20typo=20in=20`python-types.md`?= =?UTF-8?q?=20(#5116)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/docs/python-types.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/docs/python-types.md b/docs/en/docs/python-types.md index f170bb1ef..3b0ee4cf6 100644 --- a/docs/en/docs/python-types.md +++ b/docs/en/docs/python-types.md @@ -326,7 +326,7 @@ If you are using a Python version below 3.10, here's a tip from my very **subjec Both are equivalent and underneath they are the same, but I would recommend `Union` instead of `Optional` because the word "**optional**" would seem to imply that the value is optional, and it actually means "it can be `None`", even if it's not optional and is still required. -I think `Union[str, SomeType]` is more explicit about what it means. +I think `Union[SomeType, None]` is more explicit about what it means. It's just about the words and names. But those words can affect how you and your teammates think about the code.