Get Lanyrd on your mobile (iPhone, Android and more) - check it out here

Interfaces and Python

A session at PyCon US 2012

In 2.6, Python introduced the Abstract Base Classes. Before that we had "protocols" (and we still do). In this talk we'll look at how the general concept of interfaces fits into today's Python. We'll also look at some of the alternate proposals of the past, some of the controversies around ABCs, and the direction interfaces might go in the future.

Talk Outline:

  • What are Interfaces? (3 min)
  • modeling strict abstraction
  • precedents in other languages
  • Interfaces in Python (6 min)
  • duck-typing
  • Python "protocols"
  • past proposals (PEP 245)
  • how Python "interfaces" are different
  • Newer Interface Support (11 min)
  • annotations
  • Abstract Base Classes
  • why run-time validation?
  • ABC vs. duck-typing
  • Third-party Libraries (5 min)
  • Peak's PyProtocols
  • zope.interface
  • Twisted
  • What Next? (3 min)
  • strict interfaces
  • compile-time validation
  • an example interface library

For more comprehensive coverage of interfaces in Python, check out this reference: http://readthedocs.org/docs/refe...

About the speaker

This person is speaking at this event.
Eric Snow

Next session in E3

3:20pm Decorators and Context Managers by Dave Brondsema

Coverage of this session

Sign in to add slides, notes or videos to this session

Tell your friends!

When

Time 2:40pm3:20pm PST

Date Fri 9th March 2012

Short URL

lanyrd.com/spbzw

Official session page

us.pycon.org/…e/presentation/126/

View the schedule

Topics

See something wrong?

Report an issue with this session