Homework Session07

The Art of Subclassing

The Art of Subclassing by Raymond Hettinger

http://pyvideo.org/video/879/the-art-of-subclassing

The most salient points from that video are as follows:

  • Subclassing is not for Specialization
  • Classes and subclassing are for code re-use – not creating taxonomies
  • Bear in mind that the subclass is in charge

Stop Writing Classes

Stop Writing Classes by Jack Diederich

http://pyvideo.org/video/880/stop-writing-classes

“If your class has only two methods – and one of them is __init__ – you don’t need a class”