On Tue, Sep 27, 2011 at 12:20 PM, Steven D'Aprano <st...@pearwood.info> wrote:
> If it happened
> to support dates, that would be great, but I think that a daterange()
> function in the datetime module would be more appropriate.

Or even more appropriately in the calendar module.  The problem is
that we may already have a similar function there and nobody knows
about it.

> Who is going to
> think to import math if you want a range of dates?

No one.  That's why I said that if the new function ends up in math or
stats, I am +1 on frange().  However, I did in the past try to give
dates for start and stop and a timedelta for step expecting range() to
work.  This would be similar to the way sum works for non-numeric
types when an appropriate start value is given.

BTW, at the time when I worked on extending (x)range to long integers,
I attempted to make it work on dates, but at that time timedelta did
not support division by integer, so I refocused on that instead.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to