Message8655

Author ducky427
Recipients ducky427
Date 2014-06-17.17:42:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403026935.28.0.852796914808.issue2168@psf.upfronthosting.co.za>
In-reply-to
Content
The following code throws an exception in Python 2.7 while in Jython it works. I think the Python code is correct.

Code:
import time
d = time.strptime('09302010', "%d%m%Y")

Python:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/_strptime.py", line 467, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib/python2.7/_strptime.py", line 328, in _strptime
    data_string[found.end():])
ValueError: unconverted data remains: 0

Jython:
time.struct_time(tm_year=2012, tm_mon=6, tm_mday=9, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=5, tm_yday=161, tm_isdst=-1)
History
Date User Action Args
2014-06-17 17:42:15ducky427setrecipients: + ducky427
2014-06-17 17:42:15ducky427setmessageid: <1403026935.28.0.852796914808.issue2168@psf.upfronthosting.co.za>
2014-06-17 17:42:15ducky427linkissue2168 messages
2014-06-17 17:42:13ducky427create