[SciPy-dev] [timeseries][patch] Accept Date(datetime) as Date(datetime=datetime)

Matteo Bertini matteo@naufraghi....
Tue Aug 25 03:30:56 CDT 2009


Sometime I get lost in a nasty bug because I forget to use the named
argument Date(datetime=datetime).

I propose a small patch to make 'datetime' take the same way 'string'
is already following.

http://scipy.org/scipy/scikits/ticket/102

[---8<---]
    if (value %% (PyDateTime_Check(value) || PyDate_Check(value))) {
        if (!datetime) {
            datetime = value;
        }
        value = NULL;
    } // datetime = (datetime||value), value = NULL
[---8<---]

Ciao,
Matteo Bertini




More information about the Scipy-dev mailing list