From: David G. <go...@py...> - 2004-07-23 21:17:47
|
I'm thinking about reimplementing the Docutils website with ht2html. Having looked at ht2html a bit, I think I see what to do. There are a few places where I'd like to subclass ht2html's default behavior though. For instance, I'd like to put a Google search box in the banner. I still want to use Banner.Banner.get_banner to do it, but much of that class is double-underscore-class-private. Which makes it a royal pain to subclass. What's reason for all this __privacy? I can see that with so many mixin classes, there's a risk of namespace collision. But that's pretty easy to avoid. Any other reason? Any objection to refactoring the guts of ht2html to remove all this __privacy? My first thought is to replace class-private method and attribute names with single-underscore names, qualified with the class name. So Banner.__links becomes Banner._banner_links. Basically what class-privacy does, but in a non-magical form. -- David Goodger <http://python.net/~goodger> |