Author belopolsky
Recipients ajaksu2, alanvgreen, amaury.forgeotdarc, belopolsky, guettli, josh-sf, mark.dickinson, sonderblade, tiktuk
Date 2010-06-09.15:17:21
SpamBayes Score 0.000222518
Marked as misclassified No
Message-id <>
I have updated Amaury's patch for py3k.  I simplified the test for default date values and fixed a documentation nit. (Time fileds are [4:7], not [4:6]).  The result is attached as issue1100942.diff.

Note that date.strptime accepts some time specs and time.strptime accepts some date specs:

>>> time.strptime('1900', '%Y')
datetime.time(0, 0)
>>> date.strptime('00', '%H'), 1, 1)

This matches the proposed documentation, but I am not sure is desirable.  
I am about +0 for making the test more robust by scanning the format string and rejecting date format codes in time.strptime and time format codes in date.  This will also allow better diagnostic messages.  For example, instead of 

>>> date.strptime('01', '%M')
Traceback (most recent call last):
ValueError: date.strptime value cannot have a time part

we can produce "'%M' is not valid in date format specification."
Date User Action Args
2010-06-09 15:17:25belopolskysetrecipients: + belopolsky, guettli, amaury.forgeotdarc, mark.dickinson, sonderblade, alanvgreen, ajaksu2, josh-sf, tiktuk
2010-06-09 15:17:25belopolskysetmessageid: <>
2010-06-09 15:17:23belopolskylinkissue1100942 messages
2010-06-09 15:17:22belopolskycreate