From: Yuri T. <qar...@gm...> - 2008-11-17 07:18:04
|
> Meh. I'v thought about this before and even wondered why you used > classes back when I started my first extension, but the class gives us > so much more. Look at the InlinePatterns. Many of them are subclasses > that override only part of the functionality. In fact, a few don't > even have a run method, they just override an auxiliary method. > Actually, there are quite a few auxiliary methods that would now > litter the markdown namespace unnecessarily. Using classes keeps > things neat, compartmentalized, and DRY. Ok, a variation on this idea: each odict would be allowed to take as entries any callable objects - either a function or an instance of a callable class would do. We can stick with classes for our implementations, but let the users extend the functionality by adding either instances or functions. - yuri -- http://sputnik.freewisdom.org/ |