Sylvain Hellegouarch <
s...@defuze.org> writes:
> On Tue, Sep 18, 2012 at 9:29 PM, Sylvain Hellegouarch <
s...@defuze.org> wrote:
> All good stuff really. I'm so used to writing tools that I often forget
> that their current API may not be as straightforward as one could expect
> (though hardly complex as you say).
>
Just to be clear, I don't consider it complex in that it is difficult to
understand or keep straight in your head. Rather the complexity happens
in that there isn't a single prescribed method for specific tasks. A
wealth of options rarely makes a decision easier.
I agree that Tools really are pretty simple, especially compared to WSGI
middleware.
>
> Interestingly, a decorator of hookpoint would go a long way.
>
> class MyTool(...):
>
> @cherrypy.hookpoint('before_finalize')
> def cleanup_some_resource(self):
> ....
>
That is a great idea. I'll play around with it and see what comes of
it. Thanks for the feedback!
Eric
> --
> You received this message because you are subscribed to the Google Groups
> "cherrypy-users" group.
> To post to this group, send email to
cherryp...@googlegroups.com.
> To unsubscribe from this group, send email to
>
cherrypy-user...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/
> cherrypy-users?hl=en.