[Grok-dev] Re: Are functions starting with "handle_"
uli at gnufix.de
Tue Sep 11 20:58:26 EDT 2007
Am Dienstag, den 11.09.2007, 16:37 +0200 schrieb Martijn Faassen:
> Jan-Wijbrand Kolman wrote:
> > It seems names starting with 'handle_' are considered special. I'm not
> > sure I like that. Can someone explain why these names are special?
> While this is an example I used in Martian, I don't think it would be
> good to actually pick up functions. The problem with this approach is
> that one JW ran into - you can't define functions that start with that
> name anymore.
> A better pattern would be to define a docgrok specific base class and
> look for subclasses of those. This eliminates the risk of namespace
The module now uses a class grokker instead of a 'function' grokker (and
checks for correct subclassing). So those kind of problems shouldn't
show up any more.
More information about the Grok-dev