Verbose and flexible args and kwargs syntax
Nick Dokos
nicholas.dokos at hp.com
Mon Dec 12 13:02:13 EST 2011
gene heskett <gheskett at wdtv.com> wrote:
> On Monday, December 12, 2011 12:44:27 PM Chris Angelico did opine:
>
> > On Tue, Dec 13, 2011 at 2:55 AM, Nick Dokos <nicholas.dokos at hp.com>
> wrote:
> > > Terry Reedy <tjreedy at udel.edu> 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
It's not clear from the above what you mean by "that is presicely the reason":
what is "that"?
> decimal system seems to have hung on for several hundred years when it is
> clearly broken.
>
"broken" how?
Thanks,
Nick
More information about the Python-list
mailing list