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
Тэги:
#pyfhon #pytho #pytbon #pytjon #ptyhon #pytyon #ptthon #pyyhon #pythn #pythoh #pythpn #ython #pytgon #pyhon #pytohn #phthon #oython #pthon #pyghon #pythoj #pythno #pythkn #ypthon #pytuon #lython #pyrhon #pythom #pythob #puthon #pgthon #python #pyhton #pythln #pythin #pytnon #pyton