[issue17267] datetime.time support for '+' and 'now'

Alexander Belopolsky report at bugs.python.org
Thu Jun 6 00:05:48 CEST 2013


Alexander Belopolsky added the comment:

I left a few minor comments on rietveld for the last patch.  I did not see code for time.now() and I don't think adding now() should be combined with time +/- timedelta patch.  Let's do one thing at a time.

I think time + timedelta addition is fairly uncontroversial.  In the past, I argued against using detached time objects, but it is not really a valid reason for rejecting a good feature.

On subtraction, if we add time - timedelta -> time, I think users would expect time - time -> timedelta as well.  This, however, is ambiguous if we stay with mod 24h arithmetic.  The ambiguity can be lifted by requiring days=0 in the result.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17267>
_______________________________________


More information about the Python-bugs-list mailing list