Thanks. 

I left "base" out as i was trying to remove as much uneeded code from example 
as possible. I had defined it as

base = datetime.datetime(2017,1,1)

Reading your code this sounds to simple :-).

def dates(first, numdays): 
    # generate datetime objects for extra clarity 
    # note there are no implicit arguments like `base` in your code 
    for _ in range(numdays): 
        yield first 
        first += ONE_DAY 

Thanks

Sayth

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to