Author mark.dickinson
Recipients LambertDW, mark.dickinson, rhettinger, steve21
Date 2009-02-12.10:57:46
SpamBayes Score 7.71197e-10
Marked as misclassified No
Message-id <1234436269.66.0.0812186086859.issue5032@psf.upfronthosting.co.za>
In-reply-to
Content
A couple of comments:

> Also, improved the utility over its cousin, range() by allowing floating
> point arguments.

Is this wise?  From a numerical perspective, it seems to me that using
count with floating-point arguments is almost always going to be the
wrong thing to do (unless those floats are integral), and that allowing
floating-point arguments invites misuse.  For example, I'd be suspicious
of code that looked like:

for x in count(0.0, 0.1):
    do_something_with_x

where it seems quite likely that what's intended is the more robust:

for i in count():
    x = i/10.0
    do_something_with_x


Second (unrelated) comment:  on my machine, list(count()) appears to
hang, and is unresponsive to keyboard interrupts.  Is there any easy way
to make this interruptible?  While list(count()) is clearly a stupid
thing to type, it would be nice if it didn't hang the interpreter.
History
Date User Action Args
2009-02-12 10:57:50mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, LambertDW, steve21
2009-02-12 10:57:49mark.dickinsonsetmessageid: <1234436269.66.0.0812186086859.issue5032@psf.upfronthosting.co.za>
2009-02-12 10:57:48mark.dickinsonlinkissue5032 messages
2009-02-12 10:57:46mark.dickinsoncreate