Why isn't Python king of the hill?

Thomas Wouters thomas at xs4all.net
Sun Jun 3 19:27:45 EDT 2001


On Sat, Jun 02, 2001 at 06:12:59PM -0400, Tim Peters wrote:

> sum = 0
> for i in range(1, 101):
>     sum += 1/i

> In floating-point instead they'd get
> 
>     5.1873775176396206

This must be a very hypothetical python, given that in current Python they'd
get

      1

instead <nudge/wink>.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list