[issue4430] time.strptime does not allow same format directive twice

2010-08-04 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4430 ___

[issue4430] time.strptime does not allow same format directive twice

2008-11-25 Thread sil
New submission from sil [EMAIL PROTECTED]: $ python -c import time; print time.strptime('25/11/2008 25/11/2008','%d/%m/%y %d/%m/%y') Traceback (most recent call last): File string, line 1, in module File /usr/lib/python2.5/_strptime.py, line 311, in strptime format_regex =

[issue4430] time.strptime does not allow same format directive twice

2008-11-25 Thread Matthew Barnett
Matthew Barnett [EMAIL PROTECTED] added the comment: Subversion is formatting a string from a time (strftime), so a repeated placeholder is OK. You're trying to _parse_ a time from a string (strptime). If you're telling it that 2 different parts of the string are the date, what should it do?

[issue4430] time.strptime does not allow same format directive twice

2008-11-25 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: The reason this occurs is that in order to have a portable and sane implementation time.strptime() uses the re module to parse dates. The issue here is that by specifying the same format twice the re module is complaining that there are two named