Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'decorator': 0.07; 'received:mail-vb0-f46.google.com': 0.09; 'sep': 0.09; 'throws': 0.09; 'cc:addr:python-list': 0.10; 'subject:not': 0.11; 'develop.': 0.16; 'fine.': 0.16; 'recently.': 0.16; 'redundant,': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'received:209.85.212.46': 0.18; 'effort.': 0.22; 'cc:2**0': 0.23; "haven't": 0.23; 'seems': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header :In-Reply-To:1': 0.25; '(which': 0.26; 'am,': 0.27; 'logging': 0.27; 'functions.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'correct': 0.28; 'received:209.85.212': 0.28; 'reduced': 0.29; 'statements': 0.29; 'url:mailman': 0.29; "i'm": 0.29; 'fri,': 0.30; 'url:python': 0.32; 'url:listinfo': 0.32; 'function.': 0.33; 'received:google.com': 0.34; 'faster': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'url:org': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'easier': 0.38; 'things': 0.38; 'header:Received:5': 0.40; 'url:mail': 0.40; 'think': 0.40; 'improved': 0.62; 'worth': 0.63; 'more': 0.63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5SnMUGY5y947LGhQpwCfi5on9zRVd8nEpiqQ5cYLMYs=; b=hgFjoXNeTJ/wfO0J8pw8sGCPBKur9SHnpL1o7Gy03icnDtMYxffDXs9Ec+YAgi4jiK am7Fd9cGZrn9zfn1KP5l9/COsczoFsCvbIOjz6qV4aSWRXV2wqwBxnAMvt+5/SDd8EXP wra4oCb+F1uN1hgTEmgElbz+OfYH9JdBC0U3sBO4IfCyJhBzXjW7+Q8e3lcw37ATW1/z swpbeCRqxMKJN9OOLwLdJW2EH1ey1OSV8pmIv7cp/bB/KVljNCqjhpbdB1iPvskWnPpO Qcn9AH6x+zObKXhIDMVNBD8HiDOwILodXN8+7hQIiiqBDJMX5+LYE5HlG8dy6U0ZtuC8 dhnw== MIME-Version: 1.0 In-Reply-To: <874nn1jedk.fsf@handshake.de> References: <874nn1jedk.fsf@handshake.de> Date: Fri, 14 Sep 2012 23:42:18 -0400 Subject: Re: Decorators not worth the effort From: Dwight Hutto To: Dieter Maurer Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1347680541 news.xs4all.nl 6864 [2001:888:2000:d::a6]:41898 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29202 On Fri, Sep 14, 2012 at 2:40 AM, Dieter Maurer wrote: >> On Sep 14, 3:54 am, Jean-Michel Pichavant >> wrote: >>> I don't like decorators, I think they're not worth the mental effort. > > Fine. > > I like them because they can vastly improve reusability and drastically > reduce redundancies (which I hate). Improved reusability and > reduced redundancies can make applications more readable, easier > to maintain and faster to develop. Reduce redundancy, is argumentative. To me, a decorator, is no more than a logging function. Correct me if I'm wrong. It throws things at a functyion designed to watch other functions. The necessity for more than one decorator with if /else statements seems redundant, but I haven't had to use them that much recently. > > -- > http://mail.python.org/mailman/listinfo/python-list -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com