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!
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 4

  • @UriYakir
    @UriYakir 3 ปีที่แล้ว +3

    I look forward to your video every day! They are very educational and interesting, thank you!

  • @MrRastow
    @MrRastow ปีที่แล้ว +2

    mypy has changed it's default behaviour regarding implicit optional types in version 0.980. Now implicit_optional is false by default.

  • @StanislavSchmidt1
    @StanislavSchmidt1 3 ปีที่แล้ว +1

    Does it only work with None or is mypy going to annotate y: int = "hello" as Union[int, str]?