Phillip J. Eby wrote:
> At 09:54 PM 5/9/2007 +0200, BJörn Lindqvist wrote:
>> With the non-overloaded version you also have the ability to insert
>> debug print statements to figure out what happens.
> 
> Ahem.
> 
>      @before(do_stuff)
>      def debug_it(ob: ClassC):
>          import pdb
>          pdb.set_trace()
> 
> Note that you don't even need to know what module the behavior you're 
> looking for is even *in*; you only need to know where to import 
> do_stuff and ClassC from, and put the above in a module that's been 
> imported when do_stuff is called.
> 
> In other words, generic functions massively increase your ability to 
> trace specific execution paths.

Possibly another good example to include in the PEP...

Regards,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to