Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'attributes': 0.07; 'override': 0.07; 'instance.': 0.09; 'precedence': 0.09; 'sentence': 0.09; 'sep': 0.09; 'subject:method': 0.09; 'tends': 0.09; 'wrong,': 0.09; 'attributes,': 0.16; 'attributes.': 0.16; 'definition.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'name"': 0.16; 'namespace.': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'instance': 0.17; 'instance,': 0.17; 'replacing': 0.17; 'tend': 0.17; 'received:209.85.214.174': 0.21; 'assignment': 0.22; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'replace': 0.27; 'message-id:@mail.gmail.com': 0.27; 'implies': 0.29; 'class': 0.29; 'usually': 0.30; 'subject:data': 0.33; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'there': 0.35; 'but': 0.36; 'method': 0.36; 'does': 0.37; 'being': 0.37; 'received:209': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'comment': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'share': 0.61; '26,': 0.65; 'talking': 0.66; 'otten': 0.84 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 :content-type; bh=rWTyf01NjdHPf9+Yhvbp3kQgFjH+30ZxIbuj8L3ew2k=; b=hj1TYs1qNUYQkKBBJzAzaUoiwRsK4xAob4HT679zR63z2O7t0txqeIh0FUm8nlRYwG Zvh+0649JnEeVrWfGFzC2k2BTs+Fjwvgp578282H7BaiYk/gF2u0+jeGKKhj12xmu1nZ w83ls0LT026gMUwqv1RBjdq/v/MErbm/xTCx5HC37JlrmlujkrTbZOci4HxnsDQF4EfO C9SHhmqmn/NUWHWg93njRTHEo//83DhWGoDYfaNrMJPziZa1UaRmu/11FLxo7Vxl0e2P LeVfMEJ9LFMY9BcfEfSm7qOgZT3Ix3tX05Waj7jY+/H5r2M7IEorgZ4CX6e51t5/gKAL N2Qw== MIME-Version: 1.0 In-Reply-To: References: <931902e1-570b-4288-bb9b-de711318c5cd@googlegroups.com> Date: Wed, 26 Sep 2012 01:03:12 +1000 Subject: Re: data attributes override method attributes? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348585397 news.xs4all.nl 6984 [2001:888:2000:d::a6]:49602 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30096 On Wed, Sep 26, 2012 at 12:54 AM, Peter Otten <__peter__@web.de> wrote: > To me > > "Data attributes override method attributes with the same name" > > implies that data attributes take precedence over method attributes, not > that they replace them only when there is an assignment of data after the > method definition. > > I would even consider replacing the whole paragraph > with something like > > "Data attributes and method attributes share the same namespace. To avoid > name conflicts consider using verbs for methods and nouns for data > attributes" Instance attributes override (shadow) class attributes. Since methods tend to be on the class and data tends to be on the instance, the original sentence does make some sense. The section is talking about conventions, so it's not inherently wrong, but perhaps just needs a comment about methods not usually being attached to the instance. ChrisA