What’s a Protocol Class in Python?

学習

In this short, I go over the basics of Python protocol classes and give you advice on where to place them in your code.

🚀 Next-Level Python Skillshare Class: https://skl.sh/3ZQkUEN

👷 Join the FREE Code Diagnosis Workshop to help you review code more effectively using my 3-Factor Diagnosis Framework: https://www.arjancodes.com/diagnosis

🛒 GEAR & RECOMMENDED BOOKS: https://kit.co/arjancodes.

🎓 Sign up to Brilliant now and get 20% off the annual subscription: https://brilliant.sjv.io/arjancodes.

👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!

💬 Discord: https://discord.arjan.codes
🐦Twitter: https://twitter.com/arjancodes
🌍LinkedIn: https://www.linkedin.com/company/arjancodes
🕵Facebook: https://www.facebook.com/arjancodes
📱Instagram: https://www.instagram.com/arjancodes

👀 Code reviewers:
– Yoriz
– Ryan Laursen
– James Dooley
– Dale Hagglund

🎥 Video edited by Mark Bacskai: https://www.instagram.com/bacskaimark

🔖 Chapters:
0:00 Intro

#arjancodes #softwaredesign #python

DISCLAIMER – The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!

コメント

  1. RAN より:

    I don’t understand the subscript option of Protocols. I just saw a snippet of code that had something like Protocol[SomeTypeVar, AnotherTypeVar]

    I can’t find documentation on this anywhere

  2. WLockIV より:

    Since working in Swift more, I understand and appreciate protocols more. With Python though, the use of protocols seems kind of superficial unless there’s tooling in the repo and CI/CD pipelines to enforce them. I guess that’s kind of a crux w/ interpreted languages anyway…

    Anyway – your content has definitely helped me level up as a newer developer (I worked in construction only 3 years ago). Thank you!!

  3. Lawrence D’Oliveiro より:

    The Python standard library uses the term “protocol” with two entirely different meanings.

    The other one has to do with “transports” and “protocols” in asyncio.

タイトルとURLをコピーしました