This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Amber.Yust, Andreas.Pelme, Hanxue.Lee, Lakin.Wecker, alex, belopolsky, cvrebert, dstufft, eric.araujo, ethan.furman, georg.brandl, gwrtheyrn, lemburg, ncoghlan, pitrou, r.david.murray, shai, tim.peters, yselivanov
Date 2014-03-07.10:33:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1394188435.38.0.240681233206.issue13936@psf.upfronthosting.co.za>
In-reply-to
Content
More proposals from the thread (paraphrased):

- make any aware time() object always True (leave naive midnight as False)
- make any aware time() object with a non-zero UTC offset always True (leave naive midnight and UTC midnight as False)
- deprecate aware time() entirely (raises the thorny question of what to return from .time() on an aware datetime() object)
- add helpers to retrieve naivemidnight and utcmidnight constants, and calculate a localmidnight value (needs to be dynamic in case the local timezone is changed)


Independent observation:

- if time() objects are supposed to be interpreted as representing a time difference relative to midnight rather than a structured object, why is it so hard to actually convert them to an appropriate time delta? There's no method for it, you can't just subtract midnight, there's no constructor on time delta that accepts a time object, you can't easily attach a date to the time to calculate a time delta.

Use case presented for the current behaviour:

- a simulation that tracks the time and date of the simulation independently and relies on the implicit bool behaviour of time objects (not stated why this is considered more maintainable than explicit comparisons with appropriate midnight objects)
History
Date User Action Args
2014-03-07 10:33:55ncoghlansetrecipients: + ncoghlan, lemburg, tim.peters, georg.brandl, belopolsky, pitrou, eric.araujo, alex, r.david.murray, cvrebert, ethan.furman, gwrtheyrn, Lakin.Wecker, yselivanov, shai, dstufft, Andreas.Pelme, Amber.Yust, Hanxue.Lee
2014-03-07 10:33:55ncoghlansetmessageid: <1394188435.38.0.240681233206.issue13936@psf.upfronthosting.co.za>
2014-03-07 10:33:55ncoghlanlinkissue13936 messages
2014-03-07 10:33:54ncoghlancreate