Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: Pythonic style Date: Thu, 28 Apr 2016 09:31:58 -0400 Lines: 11 Message-ID: References: <5720357B.4060009@icloud.com> <572166FA.3020108@icloud.com> <85y47yjxj5.fsf_-_@benfinney.id.au> <57217E73.9040907@icloud.com> <572188F8.7010304@stoneleaf.us> <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: 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: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <1461850318.3155238.592303449.6271E6A3@webmail.messagingengine.com> X-Mailman-Original-References: <5720357B.4060009@icloud.com> <572166FA.3020108@icloud.com> <85y47yjxj5.fsf_-_@benfinney.id.au> <57217E73.9040907@icloud.com> <572188F8.7010304@stoneleaf.us> Xref: csiph.com comp.lang.python:107788 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.