The COMPLETE guide to Python properties

Carberra September 9, 2024
Video Thumbnail
Carberra Logo

Carberra

@carberra

About

Welcome to Carberra! Regardless of whether you're a budding programmer looking to make your idea a reality, or an avid computer user expanding your knowledge base, this is the place for you. I mainly focus on the world of Python, but occasionally stroll outside the Pythonosphere when I feel like getting a little CrAzY. When I started this channel, I was in my second year of my Computer Science degree. I have since graduated with a Master's, and now make content for those hoping to traverse a similar path! Below is a series of links to other places you can find me. I hope to see you around somewhere!

Video Description

Properties are unbelievably useful in Python, and serve as a convenient shortcut to one of Python's most powerful concepts, and everyone's favourite thing, descriptors! (Don't worry, properties abstract all the complex stuff away.) We won't just be looking at what they do though, we'll be going into detail about how properties work, and why they're so powerful! 00:00 - Intro [1] 00:50 - Managing private attributes using getters, setters, and deleters [2] 05:04 - Computed properties 07:00 - Cached properties [3-4] 09:44 - How are properties implemented? [5-7] 14:58 - Outro [1] https://towardsdatascience.com/pythons-most-powerful-decorator-6bc39e6a8dd8 [2] https://docs.python.org/3/library/functions.html#property [3] https://docs.python.org/3/library/functools.html#functools.cached_property [4] https://youtu.be/Z3xZnhBQUzE [5] https://docs.python.org/3/howto/descriptor.html#properties [6] https://youtu.be/l0T4jvuP0H8 [7] https://youtu.be/ChRDzldOz8g — If you want to see more of me, join my Discord server! https://discord.gg/5vVgQpK I get a lot of people asking, so here's my setup! • Visual Studio Code: https://youtu.be/PBQspYkkksU • Terminal: https://youtu.be/4RuGK3w6Mbs • Desk/recording gear: https://kit.co/Carberra • PC build: https://uk.pcpartpicker.com/list/TmzGYN Affiliations (I may earn a commission): • Codecrafters -- 40% off any plan: https://app.codecrafters.io/join?via=parafoxia • Keeper Password Manager -- 30% off your first year: https://keeper.io/r/EX4FB1C — If you have any questions, don't hesitate to ask in the comments! I'll try and answer as soon as I can, providing someone else hasn't already done so. #python #coding #howto