Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.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.052 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'syntax': 0.04; 'interpreter': 0.05; 'class,': 0.07; 'back.': 0.09; 'code"': 0.09; 'override': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'descriptors.': 0.16; 'fits': 0.16; 'subject: \n ': 0.16; 'subject:python': 0.16; 'bit': 0.19; 'cc:addr:python.org': 0.22; 'decorators': 0.24; 'errors.': 0.24; 'cc:2**0': 0.24; 'header:In- Reply-To:1': 0.27; 'topic': 0.29; 'related': 0.29; 'message- id:@mail.gmail.com': 0.30; 'bunch': 0.31; 'steven': 0.31; 'class': 0.32; 'quite': 0.32; 'checking': 0.33; 'comment': 0.34; 'subject:with': 0.35; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'received:209': 0.37; 'sometimes': 0.38; 'skip:& 10': 0.38; 'ability': 0.39; 'skip:& 20': 0.39; 'does': 0.39; 'strictly': 0.61; 'more': 0.64; 'url:blogspot': 0.65; 'talking': 0.65; 'reply': 0.66; 'opinions': 0.70; 'url:a': 0.72; 'subject:skip:A 10': 0.78; 'about?': 0.84; 'decorate': 0.84; 'fight,': 0.84; 'mood': 0.84; 'seriously,': 0.84; 'url:03': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:cc:content-type; bh=2akDAcqXZ8fdyqw58nwWh/UFR62RcULJZ8Yhu/TU7uI=; b=Fl88XPH85QA7BiNzHzyedimE/yM8iN7Lcbb6L1h/h2PIIBpbrT127XpljRXbOBqAic vjCMIDm5dHINrtVskpydoFJhB8JR8jilnPi5oKf7Fr1dQ4GrBBfoTUxhfkNmbJOpS0OL AQShtQ2c7vUiWiRFU3fCVyEZBLV84gTxr2v0l5wwL5PjKNC+mhhmyBD5ZcVrjpfrHd+J KYXYH55duLfVUcwDlw9retxIVlfeaqcXGbRqIfDZZk8Z/Se5r7k1lhmaTubkyU03hdxN Zng6WLhzcdJOm5rDuzqXOEc99SPGR8wcu2IleIw0M8fHX1Ek47i3AM6yHscg92AfF/uC yNgg== MIME-Version: 1.0 X-Received: by 10.68.237.106 with SMTP id vb10mr28477262pbc.131.1368544194797; Tue, 14 May 2013 08:09:54 -0700 (PDT) In-Reply-To: <5184aac2$0$29997$c3e8da3$5496439d@news.astraweb.com> References: <518302d7$0$29971$c3e8da3$5496439d@news.astraweb.com> <5184aac2$0$29997$c3e8da3$5496439d@news.astraweb.com> Date: Tue, 14 May 2013 21:09:54 +0600 Subject: Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError. From: "Mr. Joe" Cc: python-list Content-Type: multipart/alternative; boundary=047d7b33cfc09728ac04dcaf06b1 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: 64 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368544198 news.xs4all.nl 15932 [2001:888:2000:d::a6]:47214 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45299 --047d7b33cfc09728ac04dcaf06b1 Content-Type: text/plain; charset=UTF-8 Sorry for digging this old topic back. I see that my "'property' does not play well with polymorphic code" comment generated some controversy. So here's something in my defense: Here's the link to stackoveflow topic I am talking about: http://stackoverflow.com/questions/237432/python-properties-and-inheritance The solution that fits my taste: http://stackoverflow.com/a/14349742 A related blogpost: http://requires-thinking.blogspot.com/2006/03/note-to-self-python-properties-are-non.html Yes, I like decorators and descriptors. I also like the ability to create a "virtual property" in a python class by binding a bunch of methods as setter/getter. But I find the implementation of this "virtual property feature" a bit awkward sometimes - every time I need to override a getter/setter in a child class, I need to decorate them again. Some of you may like this "explicitness", but I don't. To Steven D'Aprano: Seriously, what's all the bashing in your last reply about? You dissected my "thank-you reply" more strictly than the python interpreter checking for syntax errors. Not in a mood for fight, but I find your opinions about "bug finding time", "hacks" and "stackoverflow" quite silly. --047d7b33cfc09728ac04dcaf06b1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sorry for digging this old topic back. I see that my = "'property' does not play well with=C2=A0polymorphic code"= ; comment generated some controversy. So here's something in my defense= :

Here's the link to stackoveflow topic I am talking about:
=C2=A0= http://stackoverflow.com/questions/237432/python-properties-a= nd-inheritance

Yes, I like decorators and descriptors. I also li= ke the ability to create a "virtual property" in a python class b= y binding a bunch of methods as setter/getter. But I find the implementatio= n of this "virtual property feature" a bit awkward sometimes - ev= ery time I need to override a getter/setter in a child class, I need to dec= orate them again. Some of you may like this "explicitness", but I= don't.

To Steven D'Aprano: Seriously, what's all the bashing= in your last reply about? You dissected my "thank-you reply" mor= e strictly than the python interpreter checking for syntax errors. Not in a= mood for fight, but I find your opinions about "bug finding time"= ;, "hacks" and "stackoverflow" quite silly.
--047d7b33cfc09728ac04dcaf06b1--