What is considered an "advanced" topic in Python?

Laura Creighton lac at openend.se
Mon Jun 1 11:07:18 EDT 2015


In a message of Mon, 01 Jun 2015 14:57:02 +0300, Marko Rauhamaa writes:
>In 1951, decimal numbers would have done little good in the UK with the
>pound divided into 20 shillings and the shilling into 12 pence. Maybe a
>"Babylonian" module would have been perfect.
>
>
>Marko

You are being facetious, but in point of fact, naive Brits who knew nothing
of neither accounting systems nor floating point for the most part got
things right when they bought their Sinclair computer in the early
1980s.

This is because their natural tendancy was to calculate all the pounds
separately, and then the shillings, separately, and then the pence.
(With Guineas and other odd stuff thrown in, when the needed them).
This meant that they kept 3+ legers at one time, and then, when they
were done calculating as one final step converted what they had into
its representation where you never had more than 100 pence or 12 shillings.
Thus, entirely by accident, they did their accounting in integers, not
decimals at all.

And this is, of course, the first thing that people who write real
systems that add money learn -- convert everything to pennies (or
whatever you call them) and do all your calculations in pennies, and
then as the final step express that in dollars and cents, or euros
and cents, or what have you.

The Brits still got in trouble when they needed to calculate things for their
4.2 per cent morgage, or decided to keep a running total of the sales
tax they were paying, but they at least did not grab the floating
number representation as the first thing off the shelf when they needed
money.

Laura



More information about the Python-list mailing list