Author LambertDW
Recipients LambertDW, rhettinger, steve21
Date 2009-01-27.02:48:01
SpamBayes Score 1.11295e-08
Marked as misclassified No
Message-id <1233024483.62.0.503081369687.issue5032@psf.upfronthosting.co.za>
In-reply-to
Content
Nice.  Now I know that $e$ is a least transcendental number.  But I 
can't figure out why inserting this code into your file (and removing 
some "itertools.") is difficult or unreadable.  I maintain a personal 
library of modules that I don't actually expect Guido to include in the 
python standard library.


import itertools

def count(offset=0,stride=1):
    for i in itertools.count():
        yield offset+i*stride


# this version probably performs faster
def count(offset=0,stride=1):
    while True:
        yield offset
        offset += stride
History
Date User Action Args
2009-01-27 02:48:03LambertDWsetrecipients: + LambertDW, rhettinger, steve21
2009-01-27 02:48:03LambertDWsetmessageid: <1233024483.62.0.503081369687.issue5032@psf.upfronthosting.co.za>
2009-01-27 02:48:02LambertDWlinkissue5032 messages
2009-01-27 02:48:02LambertDWcreate