[Python-ideas] Additional datetime-like module

Matthias Bussonnier bussonniermatthias at gmail.com
Wed Jul 29 06:42:48 CEST 2015


Hi,

For whatever reason that make me strangely think of bytes vs unicode strings…
Where you just s/simple case/str/s ; s/robust case/unicode/g and
s/timezone/encoding/g

Than being said, a new module might allow more flexibility in playing
with the API, like in Delorean[1] for example.

-- 
M


[1] : http://delorean.readthedocs.org/en/latest/

On Tue, Jul 28, 2015 at 8:40 PM, Lennart Regebro <regebro at gmail.com> wrote:
> On Tue, Jul 28, 2015 at 10:10 PM, Mike Miller <python-ideas at mgmiller.net> wrote:
>> (Apologies, I've gotten a bit lost in the recent PEP-431 discussion on -dev.
>> To recap, it concerns changing datetime to use UTC internally.)
>>
>> When doing datetime calculations, I read two major use cases, one I'll call
>> "simple" (aka naive), and the other "robust", that comes into play when
>> multiple users, zones, dst, leaps, and/or calendar requirements surface.
>
> I agree with that, but I don't see a problem with having them in the
> same module. In my opinion you should get the simple case when you
> don't have time zone information added to your datetime objects, and
> the robust calculations when you do. The only problem from where I
> stand is that today's robust calculations are incorrect.
>
>> As a non-expert-in-the-area developer, I can say that it is difficult to
>> look at the docs of datetime (and time) and know which approach to choose.
>
> Documentation could probably be better...
>
> /Lennart
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/


More information about the Python-ideas mailing list