Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!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.014 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.01; 'else:': 0.03; 'operator': 0.03; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; 'be:': 0.16; 'did,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'feb': 0.22; 'cc:addr:python.org': 0.22; "shouldn't": 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'class': 0.32; 'could': 0.34; 'no,': 0.35; 'received:google.com': 0.35; 'does': 0.39; 'air': 0.66; 'ethan': 0.84; 'furman': 0.84; 'to:none': 0.92; 'hot': 0.96 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:cc :content-type; bh=WAJ3hmekdLkt7Xyl852z7JbaXPQOLOynSECQzCaSwas=; b=varr6QTwPALK0mIw+wYCSaiauRq7irZ4kU+LtMHsPWtMB/HD+QP/2e3zkopRCgH4fq FG6bXEPY8Ji9+/2IE17RX+wbxVEPhSMYaKnRVEhpHD1XsDLA9Tzs1RDeP0GAIvnJLB1H mVUye8YE5nRJqaupDO6CuziqLUofoVPpSz29nYs77y+Butvid+ivb+89j3uGS7VNrib9 8XiYe/96VDbK4RY9mm47fxpe5SBqRjRmhNUK3bqBVNIeKLGFN9p1PKjNWW8zvOz3KUUs WoJAwRcWA30fw6+Djdc6ASRx3B6keEnlZW73vSwhZDYgFt28YpazmG+5GMXw2IYtnqRH DQ3A== MIME-Version: 1.0 X-Received: by 10.66.197.135 with SMTP id iu7mr4030400pac.149.1391983965789; Sun, 09 Feb 2014 14:12:45 -0800 (PST) In-Reply-To: <52F7C097.7050407@stoneleaf.us> References: <52F7C097.7050407@stoneleaf.us> Date: Mon, 10 Feb 2014 09:12:45 +1100 Subject: Re: imperative mood in docstrings From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 1391983969 news.xs4all.nl 2950 [2001:888:2000:d::a6]:49828 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65784 On Mon, Feb 10, 2014 at 4:53 AM, Ethan Furman wrote: > Shouldn't that be: > > class Pig: > def fly(self): > "Soar gracefully through the air if a hot place is very cold." > if hell is frozen: > self.sprout_wings() > self.altitude += 10 > self.velocity += 25 > else: > self.splat() > > ;) The Python 'is' operator does not do what you think it does. If it did, 'hell is frozen' would mean that one could say 'war is frozen', which makes no sense. No, I think this calls for a LISP-style predicate: if frozenp(hell): ChrisA