|
| https://realpython.com/ |
| Start Here | https://realpython.com/start-here/ |
|
Learn Python
| https://realpython.com/lessons/solid-principles-python-summary/ |
| Python Tutorials →In-depth articles and video courses | https://realpython.com/search?kind=article&kind=course&order=newest |
| Learning Paths →Guided study plans for accelerated learning | https://realpython.com/learning-paths/ |
| Quizzes & Exercises →Check your learning progress | https://realpython.com/quizzes/ |
| Browse Topics →Focus on a specific area or skill level | https://realpython.com/tutorials/all/ |
| Community Chat →Learn with other Pythonistas | https://realpython.com/community/ |
| Office Hours →Live Q&A calls with Python experts | https://realpython.com/office-hours/ |
| Podcast →Hear what’s new in the world of Python | https://realpython.com/podcasts/rpp/ |
| Books →Round out your knowledge and learn offline | https://realpython.com/products/books/ |
| Reference →Concise definitions for common Python terms | https://realpython.com/ref/ |
| Code Mentor →BetaPersonalized code assistance & learning tools | https://realpython.com/mentor/ |
| Unlock All Content → | https://realpython.com/account/join/ |
|
More
| https://realpython.com/lessons/solid-principles-python-summary/ |
| Learner Stories | https://realpython.com/learner-stories/ |
| Python Newsletter | https://realpython.com/newsletter/ |
| Python Job Board | https://www.pythonjobshq.com |
| Meet the Team | https://realpython.com/team/ |
| Become a Tutorial Writer | https://realpython.com/write-for-us/ |
| Become a Video Instructor | https://realpython.com/become-an-instructor/ |
| Search | https://realpython.com/search |
| https://realpython.com/search |
| Join | https://realpython.com/account/join/ |
| Sign‑In | https://realpython.com/account/login/?next=%2Flessons%2Fsolid-principles-python-summary%2F |
| Unlock This Lesson | https://realpython.com/account/join/?utm_source=rp_lesson&utm_content=solid-principles-python |
| Unlock This Lesson | https://realpython.com/account/join/?utm_source=rp_lesson&utm_content=solid-principles-python |
| https://realpython.com/courses/solid-principles-python/#team |
| Design and Guidance: Object-Oriented Programming in Python | https://realpython.com/courses/solid-principles-python/ |
| Christopher Trudeau | https://realpython.com/courses/solid-principles-python/#team |
| Recommended Tutorial | https://realpython.com/solid-principles-python/ |
| Course Slides (.pdf) | https://realpython.com/courses/solid-principles-python/downloads/solid-principles-python-slides/ |
| Sample Code (.zip) | https://realpython.com/courses/solid-principles-python/downloads/solid-principles-python-code/ |
| Ask a Question | https://realpython.com/lessons/solid-principles-python-summary/#discussion |
| https://realpython.com/feedback/survey/course/solid-principles-python/liked/?from=lesson-title |
| https://realpython.com/feedback/survey/course/solid-principles-python/disliked/?from=lesson-title |
| Contents | https://realpython.com/lessons/solid-principles-python-summary/#description |
| Transcript | https://realpython.com/lessons/solid-principles-python-summary/#transcript |
| Discussion (4) | https://realpython.com/lessons/solid-principles-python-summary/#discussion |
| Part one | https://realpython.com/courses/python-class-object/ |
| Part two | https://realpython.com/courses/python-class-inheritance/ |
| Unlock This Lesson | https://realpython.com/account/join/?utm_source=rp_lesson_preview&utm_content=solid-principles-python |
| Sign-In | https://realpython.com/account/login/ |
| Unlock This Lesson | https://realpython.com/account/join/?utm_source=rp_lesson_preview&utm_content=solid-principles-python |
| Sign-In | https://realpython.com/account/login/ |
| 00:00 | https://realpython.com/lessons/solid-principles-python-summary/#t=0.54 |
| In the previous lesson, I covered the dependency inversion principle. | https://realpython.com/lessons/solid-principles-python-summary/#t=0.54 |
| This last lesson of all three parts summarizes this part of the course and | https://realpython.com/lessons/solid-principles-python-summary/#t=4.37 |
| points you at more materials if you want to dig deeper. | https://realpython.com/lessons/solid-principles-python-summary/#t=8.7 |
| 00:12 | https://realpython.com/lessons/solid-principles-python-summary/#t=12.87 |
| This three-part course started with an introduction to the syntax used for | https://realpython.com/lessons/solid-principles-python-summary/#t=12.87 |
| classes in Python and has led all the way to principles governing good | https://realpython.com/lessons/solid-principles-python-summary/#t=16.32 |
| object-oriented design. Since Python has a mixed language style, | https://realpython.com/lessons/solid-principles-python-summary/#t=20.52 |
| you can choose whether or not to write classes. As you don’t have to artificially | https://realpython.com/lessons/solid-principles-python-summary/#t=25.0 |
| wrap all code in a class like some stricter languages, | https://realpython.com/lessons/solid-principles-python-summary/#t=29.34 |
| you’re free to let the project guide your decision. | https://realpython.com/lessons/solid-principles-python-summary/#t=32.68 |
| 00:35 | https://realpython.com/lessons/solid-principles-python-summary/#t=35.44 |
| If you’re finding you have data that naturally groups together and there are | https://realpython.com/lessons/solid-principles-python-summary/#t=35.44 |
| operations that interact only with that data, | https://realpython.com/lessons/solid-principles-python-summary/#t=38.55 |
| a class might be a good fit. For smaller programs or smaller pieces of data, | https://realpython.com/lessons/solid-principles-python-summary/#t=41.74 |
| a dictionary or namedtuple might be enough. | https://realpython.com/lessons/solid-principles-python-summary/#t=46.62 |
| 00:49 | https://realpython.com/lessons/solid-principles-python-summary/#t=49.78 |
| A good compromise between the two is a data class, | https://realpython.com/lessons/solid-principles-python-summary/#t=49.78 |
| if you prefer. To help guide your object-oriented design, | https://realpython.com/lessons/solid-principles-python-summary/#t=52.52 |
| the mnemonic SOLID covers five principles. | https://realpython.com/lessons/solid-principles-python-summary/#t=57.09 |
| The single-responsibility principle is it should do only one thing. | https://realpython.com/lessons/solid-principles-python-summary/#t=60.74 |
| 01:05 | https://realpython.com/lessons/solid-principles-python-summary/#t=65.73 |
| The open-closed principle states you should be able to extend an object without | https://realpython.com/lessons/solid-principles-python-summary/#t=65.73 |
| mucking with its internals. | https://realpython.com/lessons/solid-principles-python-summary/#t=70.19 |
| The Liskov substitution principle is a harder way of saying duck typing. | https://realpython.com/lessons/solid-principles-python-summary/#t=72.17 |
| 01:17 | https://realpython.com/lessons/solid-principles-python-summary/#t=77.8 |
| Interface | https://realpython.com/lessons/solid-principles-python-summary/#t=77.8 |
| segregation principle states you shouldn’t put stuff in an object that won’t be | https://realpython.com/lessons/solid-principles-python-summary/#t=78.85 |
| used. | https://realpython.com/lessons/solid-principles-python-summary/#t=82.4 |
| And the dependency inversion principle says interacting objects should use an | https://realpython.com/lessons/solid-principles-python-summary/#t=83.79 |
| interface between them. Both | https://realpython.com/lessons/solid-principles-python-summary/#t=88.57 |
| part one and part two of this course touched on the descriptor protocol. | https://realpython.com/lessons/solid-principles-python-summary/#t=92.13 |
| 01:36 | https://realpython.com/lessons/solid-principles-python-summary/#t=96.15 |
| If you wish to dive deeper into descriptors, this article might be your thing. | https://realpython.com/lessons/solid-principles-python-summary/#t=96.15 |
| Part two of the course talked about Python’s Enum. | https://realpython.com/lessons/solid-principles-python-summary/#t=101.66 |
| If you’d like to learn more about it, this article can show you some details. | https://realpython.com/lessons/solid-principles-python-summary/#t=104.93 |
| 01:49 | https://realpython.com/lessons/solid-principles-python-summary/#t=109.93 |
| If you’re not tired of the bad puns yet and you’re willing to dive into the | https://realpython.com/lessons/solid-principles-python-summary/#t=109.93 |
| deepest parts of how classes are built and how you can abuse that system, | https://realpython.com/lessons/solid-principles-python-summary/#t=113.19 |
| the metaclass course will blow your mind. Python is a crazy, | https://realpython.com/lessons/solid-principles-python-summary/#t=117.77 |
| crazy language sometimes. | https://realpython.com/lessons/solid-principles-python-summary/#t=122.64 |
| 02:05 | https://realpython.com/lessons/solid-principles-python-summary/#t=125.99 |
| In part two of the course, I talked about how many things in the standard library | https://realpython.com/lessons/solid-principles-python-summary/#t=125.99 |
| that look like functions actually are callable. | https://realpython.com/lessons/solid-principles-python-summary/#t=129.6 |
| If you wish to visit that some more. | https://realpython.com/lessons/solid-principles-python-summary/#t=132.67 |
| 02:14 | https://realpython.com/lessons/solid-principles-python-summary/#t=134.32 |
| This article from Trey Hunter talks about just that. | https://realpython.com/lessons/solid-principles-python-summary/#t=134.32 |
| 02:19 | https://realpython.com/lessons/solid-principles-python-summary/#t=139.37 |
| To dig further into SOLID, start with the Wikipedia article. | https://realpython.com/lessons/solid-principles-python-summary/#t=139.37 |
| It links to a separate piece for each principle and also links to | https://realpython.com/lessons/solid-principles-python-summary/#t=143.45 |
| the original paper. And finally, for little fun, | https://realpython.com/lessons/solid-principles-python-summary/#t=148.39 |
| how about the SOLID principles explained with motivational posters? | https://realpython.com/lessons/solid-principles-python-summary/#t=151.65 |
| 02:35 | https://realpython.com/lessons/solid-principles-python-summary/#t=155.63 |
| I like the one with the duck. | https://realpython.com/lessons/solid-principles-python-summary/#t=155.63 |
| 02:39 | https://realpython.com/lessons/solid-principles-python-summary/#t=159.63 |
| It’s been quite a three-part journey. I hope you found value here. | https://realpython.com/lessons/solid-principles-python-summary/#t=159.63 |
| Thanks for your attention. | https://realpython.com/lessons/solid-principles-python-summary/#t=163.62 |
| Oct. 2, 2023 | https://realpython.com/lessons/solid-principles-python-summary/#comment-76b34e98-9839-485f-8e46-90a9692aaf0c |
| Oct. 4, 2023 | https://realpython.com/lessons/solid-principles-python-summary/#comment-8a40c42b-f8b2-4cb0-82d2-9bc35dd07004 |
| Oct. 4, 2023 | https://realpython.com/lessons/solid-principles-python-summary/#comment-df087011-3726-4a7d-8a36-857afa3ac52f |
| Oct. 10, 2023 | https://realpython.com/lessons/solid-principles-python-summary/#comment-29af7bfd-cc84-43c4-b4b8-705de1c31a5b |
| Become a Member | https://realpython.com/account/join/ |
| https://realpython.com/lessons/dependency-inversion/ |
| Overview | https://realpython.com/courses/solid-principles-python/ |
|
Design and Guidance: OOP in Python (Overview) 03:30
| https://realpython.com/videos/solid-principles-python-overview/ |
|
The Decision to Use Classes 10:27
| https://realpython.com/videos/when-to-use-classes-python/ |
|
Single Responsibility 03:31
| https://realpython.com/lessons/single-responsibility-principle/ |
|
Open-Closed 05:23
| https://realpython.com/lessons/open-closed-principle/ |
|
Liskov Substitution 05:03
| https://realpython.com/lessons/liskov-substitution-principle/ |
|
Interface Segregation 03:28
| https://realpython.com/lessons/interface-segregation/ |
|
Dependency Inversion 03:31
| https://realpython.com/lessons/dependency-inversion/ |
|
Design and Guidance: OOP in Python (Summary) 02:46
| https://realpython.com/lessons/solid-principles-python-summary/ |
| Privacy Policy | https://realpython.com/privacy-policy/ |
Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover