~/talk

Descriptors, magic methods, and inheritance: oh my!

Talkat PyCon Canada 2017 · 2017-11-18..11-21· [python]
links:none on file
slides:none on file

Shows how descriptors, dunder methods, and inheritance combine to replace repetitive API client boilerplate by defining endpoint descriptor objects that bind to a base client, parameter objects that map kwargs into requests' params/body/headers, and a callable bound-endpoint that issues requests via a saved session. Presents the concrete class layout (base API client, Endpoint descriptor, Parameter subclasses), demonstrates it sending transformed HTTP calls, and points to a working GitHub implementation.

AI-written summary · about

  1. 0:00Introduction
  2. 0:51Python inheritance overview
  3. 2:09Naming your classes
  4. 3:01Inheritance
  5. 3:56Mixins
  6. 4:52Base classes
  7. 6:10Example
  8. 7:01Magic Methods
  9. 8:54Attributes
  10. 10:24Methods
  11. 13:40Descriptors
  12. 15:19What can we do
  13. 17:08Where do we start
~/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.