tubeshowcaseโ—1,140,069 videosโ™ก My collection 0
โ† Learn to Code

Learn to Code23:45

Protocol Or ABC In Python - When to Use Which One?

ArjanCodes โ†—

From the creator

๐Ÿ’ก Learn how to design great software in 7 steps: https://arjan.codes/designguide. When should you use protocol classes vs abstract base classes? Here's an example where I use both, talk about the trade-offs, and give you a suggestion of when to use each of them. The code I worked on in this video is available here: https://github.com/ArjanCodes/2021-protocol-vs-abc. ๐ŸŽ“ ArjanCodes Courses: https://www.arjancodes.com/courses. ๐Ÿ’ฌ Join my Discord server: https://discord.arjan.codes. โŒจ๏ธ Keyboard Iโ€™m using: https://amzn.to/49YM97v. ๐Ÿ”– Chapters: 0:00 Intro 2:01 Explaining the example 5:56 About abstract base classes 8:47 Protocols, nominal typing and structural typing 10:41 Using protocols 15:34 Splitting the Device class 20:05 When to use protocols vs abstract base classes #arjancodes #softwaredesign #python

Published 2021-10-29 ยท Watch on YouTube โ†—
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code