Support unavailable
Please try again later

Method restrictions (abstract, final, @Override etc.) and implementing them for Python

by Péter Szabó for EuroPython 2012

The earlier a bug is discovered, the cheaper it is to fix it. Method restrictions (such as abstract, final and @Override) help the programmer in discovering incompatibilities between a class and its subclass early (i.e. at startup time for Python and at compile time for compiled languages). Python doesn’t provide method restrictions out of the box. To implement them, we take a deep dive to the realms of Python metaprogramming (decorators, metaclasses, method wrappers, traceback inspection and builtins). Lots of short and code examples will be provided to show the building blocks and how we combine them.

Slides: http://pts-mini-gpl.googlecode.com/svn/trunk/pobjects/ptsmethodrestrictions_2012-07-03.html

Source code download: http://code.google.com/p/pts-mini-gpl/source/browse/#svn/trunk/pobjects

Video

Comments

  1. Gravatar
    Hello.

    Where can I find the code ? The slides ?

    Thanks.
  2. Gravatar
    Added links to the abstract.

    Please note that I'm planning to do some last-minute fixes on the source code (pobjects.py) and to add more unit tests. If you need a stable version, please try next week.

New comment

Language
EN
Duration
60 minutes (inc Q&A)

Tagged as

core-programming
Our Sponsors
Spotify
Python Experts
SSL Matrix
Wanna sponsor?