]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
✏ Fix typo in `python-types.md` (#5116)
authorMarcelo Trylesinski <marcelotryle@gmail.com>
Thu, 18 Aug 2022 16:04:33 +0000 (18:04 +0200)
committerGitHub <noreply@github.com>
Thu, 18 Aug 2022 16:04:33 +0000 (18:04 +0200)
docs/en/docs/python-types.md

index f170bb1ef4b1df8cb679bb90af4407f559762b84..3b0ee4cf6b1e4be6216a7fa1daf848be21d14661 100644 (file)
@@ -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.