
Le 15/06/2010 12:16, Antoine Pitrou a écrit :
On Mon, 14 Jun 2010 20:09:02 -0400 Alexander Belopolsky wrote:
One of the common complains about working with time values in Python, is that it some functionality is available in time module, some in datetime module and some in both.
Is it a common complaint, really? The common complaint, IMO, is that *none* of those two modules provides a complete feature set in itself.
The fact that we need dateutil or pytz to do some calculations is not optimal but it’s another concern. I agree that the overlap between time, datetime and calendar is annoying. More specifically, the multitude of types is bad (integer timestamp, time tuple, datetime object). Some bad one-liners that use some datetimes methods with unpacked (*arg) time tuples coming from another datetime method scream “shenanigans” to me.
I don't understand the purpose. I certainly like time.time() and I don't see the point of making it go away (will we have to use one of these "obvious" datetime-based one-liners instead?).
time.time will still be available, just under another name that makes it clear it’s a binding to a low-level C concept. A user vote: +1 on renaming, +1 on improving datetime. Regards