Barry A. Warsaw <ba...@python.org> added the comment:

On Jan 9, 2018, at 08:33, Paul Ganssle <rep...@bugs.python.org> wrote:

> @Barry I don't think it's a good idea to duplicate the `replace` 
> functionality in `datetime` like that. I think the main problem isn't the 
> `.replace`, it's the fact that you have to specify exactly which components 
> you want to set to zero - to get "the beginning of this month" or "today at 
> midnight" or "the beginning of the current hour" or "the beginning of the 
> current minute", you have to manually replace a whole list of these 
> components.

I personally haven’t ever had to do anything but get rid of the microseconds 
field, so maybe my use case is too limited.  It’s a minor inconvenience and I 
don’t like having to throw away an intermediate datetime, so that’s the main 
thing I’d like to improve.  I’d also caution trying to get too fancy and 
complicated for use cases that are already supported or are rare.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32522>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to