Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
The Strategy Pattern: Write BETTER PYTHON CODE Part 3
Play lesson

Software Design in Python - The Strategy Pattern: Write BETTER PYTHON CODE Part 3

4.0 (1)
31 learners

What you'll learn

This course includes

  • 31.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

💡 Learn how to design great software in 7 steps: https://arjan.codes/designguide. The strategy pattern is a widely used design pattern that help you write better Python code. I'll show you how to apply the strategy using a practical example written in Python. I'll cover both the classic object-oriented version of the pattern, and I'll also show you a functional version that's a bit shorter to write and works equally well. At the end of the video, there's a more advanced bit where you'll see how to add type hints for functions as parameters. 🎓 ArjanCodes Courses: https://www.arjancodes.com/courses. GitHub repository: https://github.com/arjancodes/betterpython. 💬 Join my Discord server: https://discord.arjan.codes. ⌨️ Keyboard I’m using: https://amzn.to/49YM97v. Chapters: 0:00 Intro 1:30 Code example 3:21 Main problem with the code 4:01 Switching to a strategy pattern 5:23 Creating concrete strategies 6:56 Updating the process_tickets method 10:09 Adding a new strategy 11:03 A functional version of the strategy 13:18 Adding a function type hint 14:49 Outro

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere