Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!news-transit.tcx.org.uk!rt.uk.eu.org!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.117 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.77; '*S*': 0.00; 'broken.': 0.07; 'modulo': 0.09; 'arithmetic.': 0.16; 'gene': 0.16; 'subject:syntax': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'seems': 0.20; 'cc:no real name:2**0': 0.20; "doesn't": 0.22; 'assume': 0.22; 'header :In-Reply-To:1': 0.22; 'values.': 0.23; 'cc:2**0': 0.24; "i'm": 0.26; 'assuming': 0.29; 'cc:addr:python.org': 0.29; 'pm,': 0.29; 'fairly': 0.30; 'arithmetic': 0.30; 'chris': 0.30; 'header:User- Agent:1': 0.33; 'together.': 0.34; 'done': 0.34; 'checking': 0.34; 'something': 0.35; 'similar': 0.36; 'equal': 0.36; 'example,': 0.37; 'but': 0.37; 'except': 0.37; 'received:192': 0.37; "there's": 0.37; 'not,': 0.37; 'could': 0.37; 'using': 0.38; 'monday,': 0.38; 'several': 0.38; 'clearly': 0.39; "i'd": 0.39; 'should': 0.39; 'being': 0.39; 'why': 0.39; 'received:192.168': 0.40; '2011': 0.61; 'here': 0.65; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.72; 'hundred': 0.74; '12:46': 0.84; 'hung': 0.84; 'sum': 0.89; 'sum,': 0.91; 'readily': 0.93 Date: Mon, 12 Dec 2011 13:04:34 -0500 From: Dave Angel User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: gene heskett Subject: Re: Verbose and flexible args and kwargs syntax References: <26632.1323705344@alphaville.dokosmarshall.org> <201112121246.07854.gheskett@wdtv.com> In-Reply-To: <201112121246.07854.gheskett@wdtv.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:I/QT4IqEgLXiZNpc1JPJyOX9Oav+tr1Z1T8gANLcMlw rWU3K0kk2pLsM+roWD38UVLJ4SzdP+1CurhUeBdB3s2XKaSu9E XnTpY/8kYuOC9HxBG6UvPB8+Xnis1d8hm2C+zKJP5RR36qttRJ hzKy/vcPz5/Svct/dK7VR1Ve/QVfL5Bgt4TPSAoro4z5+5bDZw qtHcFR4NLWMlFeAevelIi9jgd5bt1J6p6wuXAhJLuXlKfGR/Vo Gsl2Fc8HvaksO7bfHhs4Xorii7U+swUKKFxO0fBSFt34ZYheYw e0SmCVtf09gNwfUcvpAhCiXt86ClLaSciWWw1Iq3N6QRHDJTQU AQNzj1JNPxbSNqHj4Wc8= Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: d@davea.name 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1323713392 news.xs4all.nl 6872 [2001:888:2000:d::a6]:50898 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:17071 On 12/12/2011 12:46 PM, gene heskett wrote: > On Monday, December 12, 2011 12:44:27 PM Chris Angelico did opine: > >> 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. > I assume this was facetious, but in case not, I'd point out that any other number base will have similar modulo characteristics, except for base 2, where all numbers are congruent modulo 1, so it doesn't do much for checking values. For example, if you were using a number system of base 8, you could do "casting out sevens" by adding the digits together. -- DaveA