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: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.093 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.05; 'subject:Python': 0.06; 'none,': 0.07; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'reedy': 0.16; 'appropriate': 0.16; 'wrote:': 0.18; 'figures': 0.19; 'thu,': 0.19; 'example.': 0.24; 'header:In- Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'received:google.com': 0.35; 'there': 0.35; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'extremely': 0.39; 'to:addr:python.org': 0.39; "you're": 0.61; 'show': 0.63; 'effectively': 0.66; '=====': 0.84; 'average': 0.93; '2013': 0.98 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=S55YvlVndWnFcIMs40ETO81Z8WFd9hT4/5z/TNt0YB0=; b=tOnI/W9Dz/HbDYtWV9eI1ik4KQNRN6UlITX+qvg6iGn5roItNlOK8zBZjFovK0A3iv rY9in2dyktdALlSeGKMCMSX074olSYTmEEnj7Q5LweAfhLNbkkSDOMiYEc2Fh0/IW2Yi V9n8H8TzyTgo+9btI1qXYUpLxmrhByR21XfDqN8sRkhqhTFn5qOLw9P9pDwYiWK0XCQP 6oVACBT757xk4ehNGaMxhuGBXNz3p762lQ+5iL3Zj9JtoBHjO4TQukjEmW6ucpcn7GJK FUmaE2VP4mvCLr65O16CPJ0exSXgv2L5trTbMu10GDkgoJ/Pt+UYAy4N9TQhKeLPmhQy bu7A== MIME-Version: 1.0 X-Received: by 10.68.96.130 with SMTP id ds2mr12307906pbb.99.1381392181364; Thu, 10 Oct 2013 01:03:01 -0700 (PDT) In-Reply-To: References: <91180c35-413f-4b65-a224-917d8d68b7ec@googlegroups.com> Date: Thu, 10 Oct 2013 19:03:01 +1100 Subject: Re: Python's and and Pythons or 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1381392190 news.xs4all.nl 15872 [2001:888:2000:d::a6]:49316 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:56555 On Thu, Oct 10, 2013 at 6:43 PM, Terry Reedy wrote: > y = x and 1/x > One just has to remember that y==0 effectively means y==+-infinity ;-). Good example. Extremely appropriate to situations where you're showing a set of figures and their average: Foo 1 Bar 3 Quux 7 Asdf 9 ===== 5 Let the average show as zero if there are none, it won't hurt: print("=====",count and total/count) ChrisA