~/talk

Descriptors: Why they are like Ninjas

Talkat PyBay 2021 · on Saturday, 2021-10-09· [python]
links:none on file
slides:none on file

Any object that defines __get__/__set__/__delete__ automatically intercepts attribute lookup, and Python uses that to implement property, classmethod, staticmethod, super, slots and even functions as non-data descriptors that return bound methods. Demo builds a toy descriptor that prints cow emoji on get/set, and an ORM-style field descriptor that reads and writes a database row on attribute access. Examples run on CPython and show descriptors actually live on the class dict while instances only see returned values.

AI-written summary · about

  1. 0:00Defining python descriptors
  2. 0:31How descriptors work
  3. 1:25Using and finding descriptors
  4. 2:24Real-world ORM applications
  5. 2:54Deep dive into internals
  6. 4:28Summary and conclusions
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.