Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python.': 0.02; 'python,': 0.02; 'languages,': 0.04; 'languages.': 0.04; 'true,': 0.05; 'friday,': 0.09; 'python': 0.11; '2005.': 0.16; 'code),': 0.16; 'reliability.': 0.16; 'wrote:': 0.18; '(not': 0.18; 'code.': 0.18; 'decorators': 0.24; 'enhanced': 0.24; "i've": 0.25; '>': 0.26; 'to:2**1': 0.27; 'especially': 0.30; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'code': 0.31; 'closer': 0.31; 'view.': 0.31; 'url:python': 0.33; 'problem': 0.35; 'subject: (': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; '14,': 0.36; 'sat': 0.36; 'url:listinfo': 0.36; "i'll": 0.36; 'url:org': 0.36; 'changing': 0.37; 'level': 0.37; 'improving': 0.38; 'nov': 0.38; 'richard': 0.38; 'to:addr:python- list': 0.38; 'contract': 0.38; 'embedded': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'new': 0.61; 'experience.': 0.67; 'benefit': 0.68; 'enjoy': 0.71; 'power': 0.76; 'capability': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:from:date:message-id:subject:to :content-type; bh=HUkXhjFu7VAVD4u5NJpMhwUTeAn/WLR1GRenX3CBy28=; b=F2k9c0K1qt5H7uZmN+fRM+TmdAUg6XmSfeM33rPoCqTLshb1mJEVhVy7oZr+PLZ1eW Do3jBFkCGNVL6R9R5fOyUjkyR3H2B5VKtyjBSsNBShLHBX6cJneO28YLASPkXtxLpljy UjZ92bUW4yT0Lx99DQBRNm4NsFVaEq14VOCICEVRvXV7bh5uIQfCJBucvRCqPvN+BwiR y/r5XYYKAvZSoln2X8Wn/0XFd3DjHE5jAekRS/9c+O2U235buUX8fmFqls34tZ+TgIqg PGSrpZvlmsXhw5RzmvwYejXBz2r49N12/t6tYH7PzkqfFxqVkGJkzHJXJJnmI7RcK2qN kD9Q== X-Received: by 10.236.222.198 with SMTP id t66mr13706217yhp.125.1416019002183; Fri, 14 Nov 2014 18:36:42 -0800 (PST) MIME-Version: 1.0 References: <96c138e4-ab95-4e5f-a0c8-e696b5a926bb@googlegroups.com> <8761ehmnnt.fsf_-_@elektro.pacujo.net> <26dba8fd-e403-4129-ad57-11376eb807bd@googlegroups.com> From: Mayank Tripathi Date: Sat, 15 Nov 2014 02:36:41 +0000 Subject: Re: Decorators (was: Re: I love assert) To: Richard Riehle , python-list@python.org Content-Type: multipart/alternative; boundary=001a11c2071c9ed5900507dc9dd6 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: 83 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416019010 news.xs4all.nl 2849 [2001:888:2000:d::a6]:54913 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80803 --001a11c2071c9ed5900507dc9dd6 Content-Type: text/plain; charset=UTF-8 Decorators were there in Python 2.4, released in 2005. Not exactly new. On Sat Nov 15 2014 at 7:51:11 AM Richard Riehle wrote: > On Friday, November 14, 2014 2:18:48 PM UTC-8, Marko Rauhamaa wrote: > > Richard Riehle : > > > > > I find that not a lot of Python user really appreciate the power of > > > decorators. > > > > Well, I don't. > > > > All it means is that I've never seen a use of decorators that has > > enhanced the code. Once I "see the light," I'll have no problem changing > > my view. > > > > > > Marko > > Decorators are new in Python, so there are not a lot of people using > them. From my experience with other languages, especially Ada and Eiffel, > I enjoy the benefit of assertions (as pre-conditions and post-conditions > and invariants) at the specification level (not embedded in the code), so > decorators are closer to my other experience. They bring me closer to the > Design by Contract model of Ada and Eiffel. That is why I was so pleased > to see them added to Python. > > It is true, however, that they are not immediately intutive in Python, but > once understood, they are handy IMHO for improving code reliability. > Perhaps I was spoiled by having this capability in some other languages. > -- > https://mail.python.org/mailman/listinfo/python-list > --001a11c2071c9ed5900507dc9dd6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Decorators were there in Python 2.4, released in 2005. Not exactly new.
=
On Sat Nov 15 2014 at 7:51:11 AM Richard Rie= hle <rriehle@itu.edu> wrote:
On Friday, November 14, 2014 2:18:48 PM UT= C-8, Marko Rauhamaa wrote:
> Richard Riehle <rriehle@itu.edu>:
>
> > I find that not a lot of Python user really appreciate the power = of
> > decorators.
>
> Well, I don't.
>
> All it means is that I've never seen a use of decorators that has<= br> > enhanced the code. Once I "see the light," I'll have no = problem changing
> my view.
>
>
> Marko

Decorators are new in Python, so there are not a lot of people using them.= =C2=A0 From my experience with other languages, especially Ada and Eiffel, = I enjoy the benefit of assertions (as pre-conditions and post-conditions an= d invariants) at the specification level (not embedded in the code), so dec= orators are closer to my other experience.=C2=A0 =C2=A0They bring me closer= to the Design by Contract model of Ada and Eiffel.=C2=A0 =C2=A0That is why= I was so pleased to see them added to Python.

It is true, however, that they are not immediately intutive in Python, but = once understood, they are handy IMHO for improving code reliability.=C2=A0 = =C2=A0Perhaps I was spoiled by having this capability in some other languag= es.
--
https://mail.python.org/mailman/listinfo/python-list
--001a11c2071c9ed5900507dc9dd6--