[Python-bugs-list] [ python-Feature Requests-748201 ] time.strptime() should display format and date on error

SourceForge.net noreply@sourceforge.net
Mon, 30 Jun 2003 04:08:18 -0700


Feature Requests item #748201, was opened at 2003-06-03 16:14
Message generated for change (Comment added) made by doerwalter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=748201&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Guettler (guettli)
Assigned to: Brett Cannon (bcannon)
Summary: time.strptime() should display format and date on error

Initial Comment:
Hi!

It would be very nice if the ValueError of
time.strptime() would
display the format and the date if there is a mismatch.

Up to now (python 2.2.2) the Error looks like this:
 ValueError: format mismatch
It would be nice if it would look like this:
 format mismatch: str=2002.12.24 format=%Y-%m-%d

 thomas

----------------------------------------------------------------------

>Comment By: Walter Dörwald (doerwalter)
Date: 2003-06-30 13:08

Message:
Logged In: YES 
user_id=89016

Maybe time.strptime() should use a subclass of ValueError,
with proper attributes.

----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2003-06-28 08:17

Message:
Logged In: YES 
user_id=80475

Helpful, informative error messages are certainly a step in 
the right direction.  Referrring to Brett for implementation.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=748201&group_id=5470