"Toine" <[EMAIL PROTECTED]> writes:

> On Feb 1, 4:54 pm, "Dan Bishop" <[EMAIL PROTECTED]> wrote:
> > str(datetime.date.today() + datetime.timedelta(31))
>
> Your example gave me a few errors but I was able to adapt it into
> this:
>
> str(date.today() + timedelta(31))

That only works if you're importing 'date' and 'timedelta' into the
current namespace. It's better to keep them in the 'datetime'
namespace, so it's clear what comes from where.

    >>> import datetime
    >>> str(datetime.date.today() + datetime.timedelta(31))

-- 
 \     "How many people here have telekenetic powers? Raise my hand."  |
  `\                                                    -- Emo Philips |
_o__)                                                                  |
Ben Finney

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

Reply via email to