Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #24942
| From | rurpy@yahoo.com |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: simpler increment of time values? |
| Date | 2012-07-05 11:15 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <10c08425-e66d-4abc-958e-d36ccd216847@googlegroups.com> (permalink) |
| References | <mailman.1803.1341448153.4697.python-list@python.org> <jt4j6m$rhp$1@dont-email.me> |
On Thursday, July 5, 2012 11:34:16 AM UTC-6, John Nagle wrote: >[...] > You can also call time.time(), and get the number of seconds > since the epoch (usually 1970-01-01 00:00:00 UTC). That's just > a number, and you can do arithmetic on that. > > Adding a datetime.time to a datetime.timedelta isn't that > useful. It certainly is useful and I gave an obvious and real- world example in my previous post. > It would have to return a value error if the result > crossed a day boundary. Why? When I turn the adjustment knob on my analog clock it crosses the day boundary from 23:59 to 0:00 with no problem whatsoever. Why is Python unable to do what billions of clocks do? Instead I have to convert everything to seconds and do the same math I would have done in fortran in 1980. Phew. Another example of Pythonic "purity beats practicality"
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
simpler increment of time values? Vlastimil Brom <vlastimil.brom@gmail.com> - 2012-07-05 02:29 +0200
Re: simpler increment of time values? rurpy@yahoo.com - 2012-07-05 07:11 -0700
Re: simpler increment of time values? rurpy@yahoo.com - 2012-07-05 07:11 -0700
Re: simpler increment of time values? John Nagle <nagle@animats.com> - 2012-07-05 10:34 -0700
Re: simpler increment of time values? rurpy@yahoo.com - 2012-07-05 11:15 -0700
Re: simpler increment of time values? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-07-06 02:34 +0000
csiph-web