Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed10.multikabel.net!xlned.com!feeder5.xlned.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.060 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'broken.': 0.07; 'terry': 0.07; 'modulo': 0.09; 'am,': 0.12; 'arithmetic.': 0.16; 'e.g': 0.16; 'gene': 0.16; 'nick': 0.16; 'reedy': 0.16; 'soap,': 0.16; 'subject:syntax': 0.16; 'wrote:': 0.18; 'seems': 0.20; 'cheers,': 0.20; 'dec': 0.22; 'header:In-Reply-To:1': 0.22; "i'm": 0.26; 'fact': 0.27; 'assuming': 0.29; 'fairly': 0.30; 'arithmetic': 0.30; 'chris': 0.30; 'does': 0.32; 'tue,': 0.32; 'header:User- Agent:1': 0.33; 'done': 0.34; 'to:addr:python-list': 0.34; 'checking': 0.34; 'something': 0.35; 'equal': 0.36; 'but': 0.37; "there's": 0.37; 'monday,': 0.38; 'several': 0.38; 'clearly': 0.39; 'should': 0.39; 'being': 0.39; 'why': 0.39; 'to:addr:python.org': 0.40; '2011': 0.61; 'header:Message-Id:1': 0.62; 'here': 0.65; 'hundred': 0.74; '"there': 0.84; 'calculations': 0.84; 'hung': 0.84; 'sum': 0.89; 'received:66.118': 0.91; 'sum,': 0.91; 'readily': 0.93 X-Spam-Status: No, score=-2.1 required=5.0 X-Spam-Level: From: gene heskett To: python-list@python.org Subject: Re: Verbose and flexible args and kwargs syntax Date: Mon, 12 Dec 2011 12:46:07 -0500 User-Agent: KMail/1.13.7 (Linux/2.6.38.8-pclos2.pae.bfs; KDE/4.6.5; i686; ; ) References: <26632.1323705344@alphaville.dokosmarshall.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1256" Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323711981 news.xs4all.nl 6870 [2001:888:2000:d::a6]:56841 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17067 On Monday, December 12, 2011 12:44:27 PM Chris Angelico did opine: > On Tue, Dec 13, 2011 at 2:55 AM, Nick Dokos wrote: > > Terry Reedy wrote: > >> calculations are helped by the fact that (a+b) % c == a%c + b%c, so > > > > As long as we understand that == here does not mean "equal", only > > "congruent modulo c", e.g try a = 13, b = 12, c = 7. > > This is the basis of the grade-school "casting out nines" method of > checking arithmetic. Set c=9 and you can calculate N%c fairly readily > (digit sum - I'm assuming here that the arithmetic is being done in > decimal); the sum of the remainders should equal the remainder of the > sum, but there's the inherent assumption that if the remainders sum to > something greater than nine, you digit-sum it to get the true > remainder. > > (Technically the sum of the digits of a base-10 number is not the same > as that number mod 9, but if you accept that 0 == 9, it works fine.) > > ChrisA And that is precisely the reason I have failed to understand why the 1-10 decimal system seems to have hung on for several hundred years when it is clearly broken. Cheers, Gene -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) My web page: Grub first, then ethics. -- Bertolt Brecht