Рет қаралды 2,123
The command pattern is another pattern that can help us avoid having a bunch of if/else statements in our codebase.
Watch this 4.5-minute video for a quick explanation of the Command pattern and its implementation in Python with the example of programming a remote controller.
The state pattern is another design pattern to help reduce if/else statements in your code:
• State Design Pattern
#Python #DesignPatterns #CommandPattern
-------------------------------------------------------------------------------------
📰 Sign up for my newsletter
Become a better dev in just 5 minutes (or so) a week: codevev.com
🖥️ Free Courses to Learn Programming
Harvard CS 50: pll.harvard.edu/course/cs50-i...
FreeCodeCamp: www.freecodecamp.org
Udacity: www.udacity.com
🛒 Products I recommend
codevev.com/#products
Connect with me
Website: evgenyurubkov.com
KZbin: / @codevev
#codevev