Python Object Oriented Programming - Getters & Setters [FULL COURSE 2021]

Опубликовано: 05 Октябрь 2024
на канале: JimShapedCoding
5,251
214

The Ultimate Course of Python OOP!
In this episode, we will learn about getters and setters, they will allow you to have better control whether if to create your attributes read-only or not.

#PythonOOP #Python #property

☕ Buy me a coffee: https://www.buymeacoffee.com/jimsc

Connect with me with:
Instagram:   / jimshapedcoding  
E-mail: [email protected]
Twitter :   / jimshapedcoding  
Discord :   / discord  

🔥 Comment below if you want to see more videos in that style

👍 Subscribe to start your Python Developer / DevOps Engineer journey here:
   / @jimshapedcoding  


Links:
Repository:
https://github.com/jimdevops19/PythonOOP

My Personal website:
http://jimshapedcoding.com


Timeline of the video:
00:00 - 03:41 - Introduction / Restructuring the Project
03:42 - 05:48 - What problems do getters and setters solve? What is a read-only attribute?
05:49 - 08:19 - Creating a read-only attribute (property)
08:20 - 12:05 - How to have read-only attributes only after setting it in initialization?
12:06 - 14:05 - Differences between single to double underscore as a prefix
14:06 - 16:42 - Hot to use a setter?
16:43 - 22:28 - Getters and Setters - key differences