[Python-Dev] Status on PEP-431 Timezones

Tres Seaver tseaver at palladion.com
Tue Jul 28 02:58:46 CEST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/27/2015 06:03 PM, Tim Peters wrote:

> Even if days weren't a distinguished unit for timedelta, I'd still 
> much rather write, e.g.,
> 
> timedelta(days=5, hours=3)
> 
> than
> 
> timedelta(hours=123)
> 
> or
> 
> timedelta(hours=5*24 + 3)
> 
> etc.  The intent of the first spelling is obvious at a glance.

- From a human's perspective, "a day from now" is always potentially
unambigous, just like "a month from now" or "a year from now", whereas
"24 hours from now" is never so.  In a given application, a user who
doesn't care can always write a helper function to generate hours;  in an
applicatino whose developer who *does* care, the 'days' argument to
timedelta in its current does *not* help achieve her goal:  it is an
attractive nuisance she will have to learn to avoid.


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJVttPGAAoJEPKpaDSJE9HY0N4QAMQ+Q1/m6Dgg97aS1fRFrMA1
gi7lrWEuW0II0V9bOvB+j0IkASBahreauYb+MBnXXSy1JEDRpVQX7h4SHzLMQ+TF
YSKnxCCY1UktpegkriZF7FoN8Rhv3egA01qWPO0RjHUkZym7/W2zN5cXhRTeij8N
dbAcoT5y4gdii55T+edWjYNJDFihgKNEuh2KMPmMH37tYqOKCFsz1ojX2ox7e4dC
2yEACVz8G+bmUQQ/WXRKsM4pvMf616U9qkMcEYCVzqV+4smX+/z6c7gs244UVcr4
b4m6Du6UTNAtZpSkToYZvN9R2WbDmbG4FnUrF9eso7m1S2BjdlNyxJS7zGmp+Ttj
XxmPeptC/INx8EaILYlB70gDDVztU+QBeolP9lfmfpY3srhI1a2uIGH2LhhOuy+F
xcRoGaOIg3+JFyPa8ye6OAg6Vka9h+e02ZWaAAxfRhZgnnNduUnTaomuTKi8sCAa
s3AHG4E5dOTJdLGxhgVEOSl9nqIJNmVxLxxb2utcS7W5G28KHYLzgV6w2r/fOkYf
FvN5Lj6qQuQTPKdN807/7cl1fqOGPg4P74GMojVA816aNtjh4hTw/2AXqZ0Q0LTq
QzhatRaDY+cu1SSZV9aDuCxvm4chjITucb6g7/dvR1xSY4Y+oxFgt3/KO2N5jJSY
jBlJGbgGp9kukkwO2ret
=Aw0Q
-----END PGP SIGNATURE-----



More information about the Python-Dev mailing list