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


Groups > comp.lang.python > #82386

Re: is_<whatever_you_are_testing_for> as method or property?

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!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <jeanpierreda@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.060
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'subject:method': 0.09; 'cc:addr:python-list': 0.11; 'attributes.': 0.16; 'finney': 0.16; 'obviously,': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'cc:addr:python.org': 0.22; 'creating': 0.23; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'dec': 0.30; 'message-id:@mail.gmail.com': 0.30; 'writes:': 0.31; 'yes.': 0.31; 'received:google.com': 0.35; 'subject:?': 0.36; 'should': 0.36; 'ben': 0.38; 'pm,': 0.38; "you're": 0.61; 'skip:\xe2 10': 0.65; 'here': 0.66; 'between': 0.67; 'subject:skip:w 20': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=k+EzHYZAeUw063UX0Hh9ZbcH0wPNhsA3smRoLVy+g0U=; b=orL0oAojbs4YnTzvnSjiyffqk/fLyECRzPUDmXRSG4QLOTJTiyVOzc3/SSxNpaiBch vBYWCVKkTZaTAbsLOQ7JlGIcP4/K+3lkzsfwKcr5h+SAzfWNtZH7OeyhpCj/l9xXtgM6 h3Nw3bEOkou1YqdD0L6ii8zFXjXFqMSDbPKmYE/bk+JnITjnOshXG9nPaB8QwkbLTRdA yi+iXIf6dVhTtWQ19qVlvIH2Gjy/0rMWQiP1MYuKy2uGvhhQ99Zkd0hQKvaJytk6ph8z A6A8LsQ5AyAMGiuVz2NznkKWVvFk0IOaKNTFNG8QwGv/b2XGJv6PbBlqSiQLRJJ9SQvW oyWg==
X-Received by 10.224.74.207 with SMTP id v15mr24022660qaj.53.1418334368508; Thu, 11 Dec 2014 13:46:08 -0800 (PST)
MIME-Version 1.0
In-Reply-To <857fxxhnx8.fsf@benfinney.id.au>
References <CABUeae-rNeN_dGgkgauNr+-qChXvkgenBmgLbFioe+JDqiT+Hg@mail.gmail.com> <CAPTjJmojWeyB_bv-6Rjzkno6Cb7NiUKo7rt4Th6fvNPOsGv_jQ@mail.gmail.com> <857fxxhnx8.fsf@benfinney.id.au>
From Devin Jeanpierre <jeanpierreda@gmail.com>
Date Thu, 11 Dec 2014 13:45:28 -0800
Subject Re: is_<whatever_you_are_testing_for> as method or property?
To Ben Finney <ben+python@benfinney.id.au>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc "comp.lang.python" <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 <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16873.1418334377.18130.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1418334377 news.xs4all.nl 2918 [2001:888:2000:d::a6]:58374
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:82386

Show key headers only | View raw


On Thu, Dec 11, 2014 at 1:33 PM, Ben Finney <ben+python@benfinney.id.au> wrote:
> Chris Angelico <rosuav@gmail.com> writes:
>
>> A property should be used if what you're creating is "virtually an
>> attribute".
>
> Methods are attributes. Are you distinguishing here between “callable
> attribute” versus “non-callable attribute”?

Obviously, yes.

-- Devin

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


Thread

Re: is_<whatever_you_are_testing_for> as method or property? Devin Jeanpierre <jeanpierreda@gmail.com> - 2014-12-11 13:45 -0800

csiph-web