mypy's "implicit optional" (and why I disable it) (intermediate) anthony explains
ฝัง
- เผยแพร่เมื่อ 1 ส.ค. 2024
- today we talk about mypy's "implicit optional" and why I think it's better to not use it!
- what is Optional: • python typing: Optiona...
playlist: • anthony explains
==========
twitch: / anthonywritescode
dicsord: / discord
twitter: / codewithanthony
github: github.com/asottile
stream github: github.com/anthonywritescode
I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below! - วิทยาศาสตร์และเทคโนโลยี
I look forward to your video every day! They are very educational and interesting, thank you!
mypy has changed it's default behaviour regarding implicit optional types in version 0.980. Now implicit_optional is false by default.
Does it only work with None or is mypy going to annotate y: int = "hello" as Union[int, str]?
yeah, only `None`