Главная
Study mode:
on
1
Intro
2
What is an if statement
3
Generating summary text
4
Objectoriented programming
5
Objectoriented principles
6
Polymorphism Example
7
Python Example
8
How to Replace Conditionals
9
What is this bot trying to do
10
How we would refactor
11
Creating a base class
12
Creating a driver class
13
Adding new functionality
14
Creating a class
15
Refactoring
16
Composition vs Inheritance
17
Recap
18
Busy Beaver
Description:
Explore strategies for handling complex conditional logic using simple Python classes in this PyCon US talk. Learn to identify situations where object-oriented solutions can improve software design by examining a code refactor for an open-source project. Follow the process of transforming duplicate if statements into polymorphic classes, and understand the tradeoffs involved in refactoring to higher-level abstractions. Gain practical insights on applying object-oriented principles, polymorphism, and composition vs inheritance to enhance code readability and maintainability. Discover how to create base classes, driver classes, and implement new functionality while reducing the reliance on if statements.

If Statements Are a Code Smell

PyCon US
Add to list
0:00 / 0:00