Logo     Photos

16 Member(s) Online

PyCon is a 100%
Volunteer-run
Conference Organized by
Members of the
Python
Community.

Site/Questions etc ?

Valid XHTML 1.0 Transitional

Valid CSS!

 
PyCon 2007 is sponsored
in part by
Zenoss - The Next Step in IT Management Google Microsoft .Net Framework EWT LLC Enthought, Inc.
Platinum
Wingware Python IDE Accense Technology, Inc.
Gold
Quality Vision International Inc. MerchantCircle Big Nerd Ranch, Inc. Canonical
Silver

Details of Talk

#44: Object-oriented design with Python
Presented: Wed Mar 23, 2005 Marvin Theater 04:00 pm-04:30 pm
Author(s):
Bruce Eckel / www.MindView.net
Website(s):
Items: audio-yes    handouts-yes    released-yes    video-no    ADMIN
Abstract:

This session presents general object-oriented design principles, but focuses on object design issues where Python is distinct from mainstream statically-typed languages.

For example: What kinds of Lightweight design tools make sense in Python, and which does Python obviate? What would it mean to have interfaces in Python, and what sort of features would be valuable? Since Python produces smaller code, can objects be bigger? Tradeoffs in static vs. dynamic type checking on design and implementation. What you can do in the constructor vs statically-typed languages.

Not rules, but guidelines and ideas presented for discussion: Interface inheritance vs. implementation inheritance, substitution vs extension, the impact of Python on these concepts. Partitioning your design into objects. Not enough objects and objects that are too big/complex. Creating robust objects. Wiring together objects to create an application. Design by contract; Base classes as interfaces with constraints. Preferring composition to inheritance.

Design patterns issues: Which design patterns in GoF are so C++-ish that they don't make sense in Python? Does the Visitor design pattern have any relevance in Python? Built-in design patterns: Generators (special case of factories). Python and the homogeneity problem (Composite pattern, using isinstance).

Item(s):
OODesignInPython.pdf 20:19:23 2005/04/05 958.5 kB application/pdf
abstract.stx 02:58:34 2005/04/14 1.3 kB text/html
pycon-20050323-1-1600-44-kuro.mp3 12:57:17 2005/07/02 24.2 MB audio/mpeg
pycon-20050323-1-1600-44-kuro.ogg 07:21:48 2005/05/21 6.8 MB application/ogg

Note: Talk recordings have come from different donors, with different levels of quality. A suffix has been added to the basename of each recording reflecting this. For eventual upload to a repository like archive.org, a formal naming convention has been followed:

pycon-{date}-{track}-{timeslot}-{talkno}-{donor}.mp3

For those who might prefer a more human-meaningful name, the recordings have MP3/Ogg/Flac ID3 information within and a simple python script could rename your collection to something in a {title}-{author} form.