Python Classes Tutorial #5 | Advanced Concepts
ฝัง
- เผยแพร่เมื่อ 1 มิ.ย. 2024
- In this final tutorial on classes in Python, we are going to discuss two advanced class concepts: dependency injection and immutable classes. Dependency injection is a design pattern in which the dependencies of a class are provided externally, and immutable classes are classes in which the state of an object cannot be modified after its creation, ensuring that their instances remain constant throughout their lifecycle. Please keep in mind, the complexity of classes reaches far beyond the topics covered in this video so if there is a specific topic you’d like see discussed, drop a comment below.
Please like and subscribe if you found this video helpful!
Link to the playlist for this series: • Classes in Python
00:00 - Intro
00:30 - Dependency Injection
04:26 - Immutable Classes
09:00 - Conclusion - วิทยาศาสตร์และเทคโนโลยี
I know that what you did was an interesting use of @property, but I am sure you already know about using setters and deleters as decorators, right?
Yep, you can use the setter and deleter for setting and deleting values of attributes.
your keyboard sounds amazing, what is it?
It's actually just a MacBook Pro keyboard!