On Thu, 10 Feb 2022 at 16:44, Christopher Barker <python...@gmail.com> wrote:
>
> Since a started this:-)
>
> 1) the complexities are exactly why this *might* be a candidate for the 
> stdlib. Those are the things that someone is likely to get wrong, or not 
> think of, when they write something quick themselves, and only lightly test.

Fair. But no-one has come up with a use case to justify doing the work
to handle those complexities. All the discussion has tended to be
around how it "wouldn't be too hard".

> 2) it doesn’t have to be everything for everyone- it has to be many things 
> for many (most) people.

Agreed, but that's mostly just a matter of degree. At a minimum, if it
deliberately omits certain situations, those need to be documented.
Otherwise there's a maintenance cost from people asking for such
support and debating whether it's "implied" by the existence of the
function in the stdlib.

> 3) DST is a nightmare, plain and simple. The datetime module was useful for 
> years even before it gained the ability to deal with it at all.[*]
> [*] now that I think about it, I would probably only do this without DST — 
> including DST would require a DST database, which the stdlib doesn’t include.

https://docs.python.org/3/library/zoneinfo.html

Having a stdlib function that handles range-type sequences for dates,
but does not handle the various timezone-aware datetime types is bound
to cause some level of confusion. Having said that, maybe it's simple
to do this right. That's my point, someone needs to do the work to
think all this through.

I'm not *against* the idea, I just don't think it's worth the effort
given the (fairly trivial) benefits that have been claimed so far. In
particular, I have no use for it personally - the one-liners already
posted in this thread would be perfectly fine for any use I can
imagine, and I see no reason to add such one-liners to the stdlib.

Paul
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/QQ5XGZPZ7GUJDOK5HE4M5DADNLLN5J6F/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to