Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder5.news.weretis.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.97; '*S*': 0.00; 'sure.': 0.05; 'reference:': 0.07; 'integer,': 0.09; 'integers': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'defined': 0.15; 'definition,': 0.16; 'gamma': 0.16; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'header:In-Reply-To:1': 0.22; '0);': 0.22; 'cc:addr:python-list': 0.22; 'url:wiki': 0.24; 'example': 0.24; 'subject: -- ': 0.25; 'chris': 0.27; 'object': 0.27; 'function': 0.27; 'string': 0.29; 'matches': 0.29; 'cc:addr:python.org': 0.31; 'one,': 0.31; 'zero.': 0.31; 'received:192.168.1': 0.34; 'received:192': 0.34; 'there': 0.35; 'url:en': 0.35; 'header:User-Agent:1': 0.35; 'rather': 0.36; 'received:192.168': 0.37; 'should': 0.37; 'reasonable': 0.38; 'url:org': 0.38; 'received:perfora.net': 0.68; 'reply-to:no real name:2**0': 0.72; 'header:Reply-To:1': 0.72; '02:59': 0.84; 'pedantic,': 0.84; 'received:74.208.4.194': 0.84 Date: Sun, 17 Apr 2011 22:04:47 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Chris Angelico Subject: Re: Feature suggestion -- return if true References: <8abff237-5ccd-4eb6-85c8-cdc9e87520b7@bl1g2000vbb.googlegroups.com> <90v871FkuaU1@mid.individual.net> <4daaa8a0$0$29986$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:QWrGkBBRCMoImKtILgBnLCQPYT3iFhaU4SGLMDehqk9 LcCXVFDC9nDo5WRhH4fqYvS+jFhp6xBVp2KIAMl61KCy3Rlu+y 6M+JPMHtYVyJn3t8jYbY5uC73I7jl9j0hSgzdE/1suFPdu23Sy xj1HccxKGA9LNctXAj8G8SDxI1hR8NaggigWbmxUqgaXNiL/CP dPoGTCfqCbqRloqcRfrMg== Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: davea@ieee.org 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: 22 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1303092310 news.xs4all.nl 81473 [::ffff:82.94.164.166]:40723 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3449 On 01/-10/-28163 02:59 PM, Chris Angelico wrote: > > > Sure. In my (somewhat contrived) example of factorials, that's going > to be true (apart from 0! = 0); and if the function returns a string > or other object rather than an integer, same thing. If there's the Just to be pedantic, by any reasonable definition, 0! == one, not zero. One reference: http://en.wikipedia.org/wiki/Factorial 3rd sentence. More interestingly, There is a gamma function defined for lots of real and complex numbers, which for all non-negative integers matches the factorial: gamma(n) = (n-1)! The gamma function has the same value (1) for one and two, so to be consistent, factorial should have that value for both zero and one. DaveA