2009/4/16 <s...@pobox.com>: > >>> date(2008, 1, 30) + monthdelta(1) > datetime.date(2008, 2, 29) > > What would this loop would print? > > for d in range(1, 32): > print date(2008, 1, d) + monthdelta(1) > > I have this funny feeling that arithmetic using monthdelta wouldn't always > be intuitive.
Oh, certainly! But in the absence of "intuitive", I've found in the past that "standardised" is often better than nothing :-) (For example, I use Oracle's add_months function fairly often - it's not perfect, and not always intuitive, but at least it's well-defined in the corner cases, and fine for "normal" use). Paul. _______________________________________________ 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