for / while else doesn't make sense

Chris Angelico rosuav at gmail.com
Mon May 23 11:57:14 EDT 2016


On Tue, May 24, 2016 at 1:47 AM, Steven D'Aprano <steve at pearwood.info> wrote:
> On Tue, 24 May 2016 12:57 am, Chris Angelico wrote:
>
>> On Tue, May 24, 2016 at 12:29 AM, Ben Bacarisse <ben.usenet at bsb.me.uk>
>> wrote:
>>> Right, but this is to miss the point.  Let's say that 4000 years have
>>> defined 1/3 to be one third, but Python 3 (as do many programming
>>> languages) defines 1/3 to be something very very very very close to one
>>> third, and *that* idea is very very very very new!
>>
>> Have you ever written one third as 0.33333333 ? Because that's also
>> something very very close to one third.
>
> For many purposes, 0.33 is close enough to one third.

As is 3.14 close enough to π. (Or 256/81 or any of the other
historical values.) Approximations are nothing new.

ChrisA



More information about the Python-list mailing list