Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Ford (0.13 sec)

  1. docs/en/docs/python-types.md

    * 🚨 Avoid using `Optional[SomeType]`
    * Instead ✨ **use `Union[SomeType, None]`** ✨.
    
    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[SomeType, None]` is more explicit about what it means.
    
    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)
Back to top