Write Better Classes in Python Using Access Modifiers

Опубликовано: 19 Март 2023
на канале: TrentDoesMath
144
10

This video provides an introduction to getters and setters, and access modifiers in Python, explaining how they are used to access and modify class attributes in object-oriented programming. The video covers two ways of defining methods in Python to control attribute access and modification: explicitly defining methods and using descriptors. The video also discusses the drawbacks and benefits of using native Python properties and using a setter method to ensure code is more robust and less error-prone.

Chapters 📖:
00:00 Intro
01:05 Explanation of the code example
10:25 Why we need Access Modifiers and Getters and Setters
14:45 Access Modifiers
29:58 Getters and Setters
33:34 Getters and Setters the Pythonic way
49:33 Getters and Setters the Explicit way
01:02:33 Caveats to using the methods
01:05:02 Outro

References 📚:
[Getters and Setters in Python](https://realpython.com/python-getter-...)
[Access Modifiers in C#](https://learn.microsoft.com/en-us/dot...)
[Access Modifiers in Python](https://www.geeksforgeeks.org/access-...)

Links 🔗:
GitHub link: https://github.com/trentpark8800/pyth...


На этой странице сайта вы можете посмотреть видео онлайн Write Better Classes in Python Using Access Modifiers длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь TrentDoesMath 19 Март 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 144 раз и оно понравилось 10 зрителям. Приятного просмотра!