Brett Cannon <br...@python.org> added the comment:

I don't think people would get confused as to what datetime.utc was, but as you 
pointed out, Alexander, the module seems to like class attributes so 
timezone.utc is fine.

As for the float/int argument, I personally am wary of it. Since the timedelta 
constructor accepts hours as a keyword argument, I don't see the benefit of 
having to support both timedeltas and int/floats. And I can see someone messing 
up and putting in a float that is not perfectly representable and getting upset 
at odd behavior. I say keep it simple and just accept timedeltas for now. If 
there really is demand for accepting integers in the constructor than it can be 
added without backwards-compatibility issues. Better to keep the API small and 
expand later than make it too big to start and being burdened with extraneous 
API stuff.

----------

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

Reply via email to