Descriptors are everywhere in Python, but you may not have realized it.
They underlie functions, properties, staticmethods, and more! In this video we take a look at 8 Python descriptors and explain the descriptor protocol.
― mCoding with James Murphy (https://mcoding.io)
Source code: https://github.com/mCodingLLC/VideosSampleCode
descriptor docs: https://docs.python.org/3/howto/descriptor.html
staticmethods vid:
https://youtu.be/SXApHXsDe8I
super vid:
https://youtu.be/X1PQ7zzltz4
slots vid:
https://youtu.be/Iwf17zsDAnY
SUPPORT ME ⭐
---------------------------------------------------
Patreon: https://patreon.com/mCoding
Paypal: https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE
Other donations: https://mcoding.io/donate
Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, John Martin, Mutual Information
BE ACTIVE IN MY COMMUNITY 😄
---------------------------------------------------
Discord: https://discord.gg/Ye9yJtZQuN
Github: https://github.com/mCodingLLC/
Reddit: https://www.reddit.com/r/mCoding/
Facebook: https://www.facebook.com/james.mcoding
CHAPTERS
---------------------------------------------------
0:00 Intro
0:17 What are descriptors?
2:08 #1 functions
3:10 #2 properties
5:27 #3 classmethods and staticmethods
6:47 #4 slots
7:42 #5 __dict__
8:30 #6 SQLAlchemy models
9:06 #7 validators
10:16 #8 super lookups
10:46 Interactions with __getattr__
14:02 Thanks