[py-dev] py.log suggestion

holger krekel hpk at trillke.net
Sat Oct 15 15:11:07 CEST 2005


On Sat, Oct 15, 2005 at 08:58 -0400, François Pinard wrote:
> > >     if trace.dossier:
> > >         diagnostic = prepare_diagnostic_information()
> > >         trace.dossier(diagnostic)
> 
> [holger krekel]
> 
> > just a quick note (i am no traavel/sprinting) ... 
> 
> Yes, I know you're away :-).
> 
> > yes, thinking about this makes sense.  What about making the tracing
> > call callables if they are passed and a consumer is there?
> 
> So one would write:
> 
>      if callable(trace.dossier):
>          diagnostic = prepare_diagnostic_information()
>          trace.dossier(diagnostic)
>
> instead?  

i was thinking of just

    trace.dossier(prepare_diagnostic_information) 

actually. If there is no consumer then this would not call 
the callable. Does that make sense to you? (we could additionally pass 
any remaining arguments to the callable but that might be hard 
to conceptually define nicely). 

cheers, 

    holger


More information about the py-dev mailing list