Simple Function Decorator Sample Snippet

alister alister.nospam.ware at ntlworld.com
Tue May 13 07:09:36 EDT 2014


On Tue, 13 May 2014 01:04:39 -0500, Mark H Harris wrote:
> Yes, because depending on your interface the code can get mangled (the
> indentation thing breaks).  the quoted paste seems to avoid this mostly
> with the downside that the quote characters need to be striped from the
> py file.   <sorry>   by the way, any suggestions are welcome regarding
> that too...  there doesn't really seem to be a good way to share code on
> the group consistently.

use a news reader rather than Google groups 

BTW documenting decorators is a good idea even if only for your own use. 
it has taken me a long type to groc decorators & see any reason why I 
would use one rather than just modifying my function.
(I finally got it when mucking about with wsgi where I used a couple of 
decorators to prepend & append header & footer files to various other 
functions, reducing code duplication significantly 




-- 
WHO sees a BEACH BUNNY sobbing on a SHAG RUG?!



More information about the Python-list mailing list