3 ms·
A big part of it is about user expectations. I would be shocked if any experienced Python programmer who wasn't familiar with this exact implementation detail
by randlet 13y ago
A big part of it is about user expectations. I would be shocked if any experienced Python programmer who wasn't familiar with this exact implementation detail expected the following:
if datetime.time(0, 0, 0):
print "foo"
else:
print "bar"
to print "bar"
- mzs 13y agoOh man people that have used python for a while have come to expect datetime to just be strange in general. Essentially the default is to be in your TZ from midnight, you need to convert and there are different classes for epoch, and some of the members seemingly willy-nilly are not there or named differently then! And that's just the start, that's why things like arrow exist: http://crsmithdev.com/arrow/ http://crsmithdev.com/arrow/ time and datetime in python show their age.