- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for shortcut (0.22 sec)
-
docs/en/docs/python-types.md
Using `Optional[str]` instead of just `str` will let the editor help you detecting errors where you could be assuming that a value is always a `str`, when it could actually be `None` too. `Optional[Something]` is actually a shortcut for `Union[Something, None]`, they are equivalent. This also means that in Python 3.10, you can use `Something | None`: === "Python 3.10+" ```Python hl_lines="1"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17K bytes - Viewed (0)