How to write actually object-oriented python

01:15 PM - 01:45 PM on August 17, 2014, Room 702

Per Fagrell

Audience level:


The multi-paradigm flexibility of Python can bite developers new to Python or object-orientation, since self-restraint and design know-how is needed to keep code style paradigm-consistent. Learn about OO principles like SOLID and Tell-Don't-Ask and how they apply in Python for more uniform, testable, and working OO code.


The talk will explain briefly the two primary coding paradigms used with Python (procedural and structured (i.e. object-oriented)) and show the pit-falls of mixing the two within a larger software project. To help developers hone their design sense for object-oriented projects, the talk will then outline the SOLID design principles and Tell-Don't-Ask with examples of how they are applied with Python. Emphasis will be placed on identifying traits or 'smells' for each principle, increasing the chance for participants to successfully find real-world cases in their own code. Finally everything will be tied together to show how uniformly Object-Oriented code simplifies testing and reasoning about code. After the talk attendees should be able to reason about their code, how well it conforms to the object-oriented paradigm and find common faults in their code. They should ideally find designing OO software more straight-forward and inviting than before.