python typing: TYPE_CHECKING (intermediate) anthony explains

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

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

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

    I like the way he makes videos. No pre written scripts and fixing errors on the fly. 👍👍

  • @EddiKh
    @EddiKh 5 หลายเดือนก่อน

    came here to solve an issue with cycle imports, but learned a lot! thank you!

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

    thank you for explaining it very clear, could able to understand in one go :)

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

    Hi Anthony, I often see you going for `if __name__ == "__main__": exit(main())`, but how is exit supposed to end up in the global namespace? It's present in the REPL, but it doesn't seem to be there in a regular `python3 your_module_here.py` invocation...

    • @anthonywritescode
      @anthonywritescode  3 ปีที่แล้ว

      it's there for me? do you have a strange `site.py` or are you using `python3 -S` ? both are fairly rare (3rd party packages don't really work without it) - I talk a bit about this in th-cam.com/video/sv46294LoP8/w-d-xo.html

    • @stijnvandrongelen5625
      @stijnvandrongelen5625 3 ปีที่แล้ว

      @@anthonywritescode Should've double-checked it, but thanks for the reference to site.py. TIL :D

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

    you appear to have spelled discord incorrectly in your description (future planning)

  • @danielcastagna1299
    @danielcastagna1299 ปีที่แล้ว

    thank you!