~/talk

Pythonic Interfaces The secret to building maintainable, quality code

Talkat PyCon India 2020 · 2020-10-02..10-05· [python]
links:none on file
slides:none on file

Defines interfaces as method blueprints and demonstrates enforcing them to catch missing methods and wrong signatures earlier. Uses stdlib introspection — inspect.signature, inspect.isdatadescriptor, MRO navigation plus isgeneratorfunction/iscoroutinefunction — to compare method names, signatures, descriptors and decorators. Compares enforcement options: abc (checks at instantiation) versus early checks on import/class creation via the implements decorator or python-interface/zope.interface. Concludes Python 3 typing and inspect make richer, earlier enforcement practical.

AI-written summary · about

  1. 0:00Introduction
  2. 2:28What is an interface
  3. 12:02Abstractbased classes
  4. 15:18Python 3 Libraries
  5. 22:51Comparison
  6. 26:29Questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.