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


Groups > comp.lang.python > #107788

Re: Pythonic style

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Random832 <random832@fastmail.com>
Newsgroups comp.lang.python
Subject Re: Pythonic style
Date Thu, 28 Apr 2016 09:31:58 -0400
Lines 11
Message-ID <mailman.187.1461850320.32212.python-list@python.org> (permalink)
References <5720357B.4060009@icloud.com> <CALwzidn0SN5yax3bfmTPDTxBvfr+bnVNzeUe3dZYrS9ji2WCtw@mail.gmail.com> <572166FA.3020108@icloud.com> <85y47yjxj5.fsf_-_@benfinney.id.au> <57217E73.9040907@icloud.com> <572188F8.7010304@stoneleaf.us> <CAPTjJmrkELf4rb+1UgmPwHxmd+wzp6WLxxN+ut4L3xJuHhmqmA@mail.gmail.com> <mailman.168.1461815768.32212.python-list@python.org> <c7ca7770-7dfa-463c-b776-cab472d9f79e@googlegroups.com> <1461850318.3155238.592303449.6271E6A3@webmail.messagingengine.com>
Mime-Version 1.0
Content-Type text/plain
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de SgJMeVr8MCqoTzTagzUsOQe2JajCGsuGCePdgfBN0dDg==
Return-Path <random832@fastmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'received:internal': 0.09; 'thursday,': 0.13; 'thu,': 0.15; '2016': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'implementing': 0.18; 'somewhere': 0.24; 'header :In-Reply-To:1': 0.24; 'chris': 0.26; 'rule': 0.33; 'but': 0.36; 'should': 0.36; 'cases': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'to:addr:python.org': 0.40; 'where': 0.40; 'header:Message-Id:1': 0.61; 'course': 0.62; 'obvious': 0.76; 'utc+5:30,': 0.84
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=Hh96DGxg+PX7XODevZu6YRYktfE=; b=AD4a3X T5q8fR5JbStRHByzBb5Tpg0twphbaSoJs20dQIxsY3xEJKtVSASjHQnuyP4T7SS1 SjoKDMEN8GgjRzlRrZsiIbV6tFOatRzrexxPGx20Cu/B2lYPLa7dmnQtfTZKEgeA kDho1gRfCLlYCCYCWdJDtSm/m6IuvNoKnQmWs=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Hh96DGxg+PX7XOD evZu6YRYktfE=; b=IdjInNXgDjdjE98+QHQvFJlW9/po9ZoNFUFedIbwVsChEBh eWRtBTJLndYne4VxPFVGMifoeDWVAfbNEsoiF2FeEkA6FBbsyPbWGwgZIQVByT1j 2QtRvvQrFMuWCRu9SLA6CBLJmvzmpsTHJBAQPmu3Q2HHHL8EUXBaKtegZlaE=
X-Sasl-Enc fRSbiqBkNzxNQ/ps99wj2WETLZhfgmEEk38Wg8ORrbTg 1461850318
X-Mailer MessagingEngine.com Webmail Interface - ajax-f1265324
In-Reply-To <c7ca7770-7dfa-463c-b776-cab472d9f79e@googlegroups.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.22
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>
X-Mailman-Original-Message-ID <1461850318.3155238.592303449.6271E6A3@webmail.messagingengine.com>
X-Mailman-Original-References <5720357B.4060009@icloud.com> <CALwzidn0SN5yax3bfmTPDTxBvfr+bnVNzeUe3dZYrS9ji2WCtw@mail.gmail.com> <572166FA.3020108@icloud.com> <85y47yjxj5.fsf_-_@benfinney.id.au> <57217E73.9040907@icloud.com> <572188F8.7010304@stoneleaf.us> <CAPTjJmrkELf4rb+1UgmPwHxmd+wzp6WLxxN+ut4L3xJuHhmqmA@mail.gmail.com> <mailman.168.1461815768.32212.python-list@python.org> <c7ca7770-7dfa-463c-b776-cab472d9f79e@googlegroups.com>
Xref csiph.com comp.lang.python:107788

Show key headers only | View raw


On Thu, Apr 28, 2016, at 01:16, Rustom Mody wrote:
> On Thursday, April 28, 2016 at 9:26:21 AM UTC+5:30, Chris Angelico wrote:
> > My rule of thumb is: Dunders are for defining, not for calling. It's
> > not a hard-and-fast rule, but it'll get you through 99%+ of
> > situations.
> 
> Neat and clever.
> Should get in the docs somewhere

And even most of the obvious cases where you would want to call one
[e.g. on super] are in the course of implementing one.

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


Thread

Re: Pythonic style Chris Angelico <rosuav@gmail.com> - 2016-04-28 13:56 +1000
  Re: Pythonic style Rustom Mody <rustompmody@gmail.com> - 2016-04-27 22:16 -0700
    Re: Pythonic style MRAB <python@mrabarnett.plus.com> - 2016-04-28 12:16 +0100
      Dunder docs again (was Pythonic style) Rustom Mody <rustompmody@gmail.com> - 2016-04-28 04:45 -0700
        Re: Dunder docs again (was Pythonic style) MRAB <python@mrabarnett.plus.com> - 2016-04-28 13:02 +0100
          Re: Dunder docs again (was Pythonic style) Marko Rauhamaa <marko@pacujo.net> - 2016-04-28 15:25 +0300
            Re: Dunder docs again (was Pythonic style) MRAB <python@mrabarnett.plus.com> - 2016-04-28 14:22 +0100
      Re: Pythonic style Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-29 12:48 +1200
        Re: Pythonic style Chris Angelico <rosuav@gmail.com> - 2016-04-29 10:57 +1000
          Re: Pythonic style Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-29 18:12 +1200
            Re: Pythonic style Chris Angelico <rosuav@gmail.com> - 2016-04-29 16:45 +1000
        Re: Pythonic style Steven D'Aprano <steve@pearwood.info> - 2016-04-29 19:59 +1000
    Re: Pythonic style Random832 <random832@fastmail.com> - 2016-04-28 09:31 -0400

csiph-web