Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #71467

Re: Simple Function Decorator Sample Snippet

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.roellig-ltd.de!open-news-network.org!cyclone03.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!post02.fr7!fx10.am4.POSTED!not-for-mail
From alister <alister.nospam.ware@ntlworld.com>
Subject Re: Simple Function Decorator Sample Snippet
Newsgroups comp.lang.python
References <lks7pd$gd0$1@speranza.aioe.org> <5371b3a7$0$11109$c3e8da3@news.astraweb.com> <lksclm$qqi$1@speranza.aioe.org>
User-Agent Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Lines 22
Message-ID <Q3ncv.34411$GL7.16117@fx10.am4> (permalink)
NNTP-Posting-Host 82.5.246.13
X-Complaints-To http://netreport.virginmedia.com
X-Trace 1399979376 82.5.246.13 (Tue, 13 May 2014 11:09:36 UTC)
NNTP-Posting-Date Tue, 13 May 2014 11:09:36 UTC
Organization virginmedia.com
Date Tue, 13 May 2014 11:09:36 GMT
X-Received-Body-CRC 846692312
X-Received-Bytes 1830
Xref csiph.com comp.lang.python:71467

Show key headers only | View raw


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?!

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Simple Function Decorator Sample Snippet Mark H Harris <harrismh777@gmail.com> - 2014-05-12 23:41 -0500
  Re: Simple Function Decorator Sample Snippet Steven D'Aprano <steve@pearwood.info> - 2014-05-13 05:54 +0000
    Re: Simple Function Decorator Sample Snippet Mark H Harris <harrismh777@gmail.com> - 2014-05-13 01:04 -0500
      Re: Simple Function Decorator Sample Snippet alister <alister.nospam.ware@ntlworld.com> - 2014-05-13 11:09 +0000

csiph-web