On Sun, Nov 07, 2010 at 04:11:19PM +0200, Marius Gedminas wrote:
> http://docs.pylonshq.com/pyramid/dev/narr/urldispatch.html#cleaning-up-after-a-request
> recommends this for running cleanup code after request processing:
> 
<...>
> 
> I'm uneasy about the __del__.  If used, it would prevent people from porting
> their Pyramid apps to Jython or PyPy.
> 
> Isn't there a better way?  The note in that section mentions middleware
> which can run cleanup code after request processing, but it's a bit
> heavyweight.

I'm speed-reading the docs in order, and just got to
http://docs.pylonshq.com/pyramid/dev/narr/hooks.html#using-finished-callbacks

Why not recommend this method instead of __del__?

Marius Gedminas
-- 
I had a box of rubber bands that kept popping open and spilling rubber bands in
my desk drawer. Could not, for the life of me, think of anything that might
keep that box shut.
        -- zombieunicorn on reddit

Attachment: signature.asc
Description: Digital signature

Reply via email to