PEP 321: Date/Time Parsing and Formatting

Gerrit Holl gerrit at nl.linux.org
Thu Nov 20 11:43:41 EST 2003


A.M. Kuchling wrote:
[amk]
> >> date.strptime(..., '1992-10-15 12:05:32')?  Does it raise an exception? Does
> >> it silently ignore the time data?  Or is it illegal to use time-related
> >> specifiers such as %H with date.strptime, or date-related ones such as %m
> >> with time.strptime?

[Gerrit]
> > I don't see the difference between the first and the last one. I am for

[amk]
> First one:
> date.strptime(..., '1992-10-15 12:05:32') -> ValueError: time value ignored

Well, you asked three questions:
1) Does it raise an Exception?
2) Does it silently ignore the time data?
3) Is it illegal to use time-related ...?

So I'd say this is the 2nd one. The difference I don't see is between
raising an Exception and it being illegal.

yours,
Gerrit.

-- 
255. If he sublet the man's yoke of oxen or steal the seed-corn,
planting nothing in the field, he shall be convicted, and for each one
hundred gan he shall pay sixty gur of corn.
          -- 1780 BC, Hammurabi, Code of Law
-- 
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Kom in verzet tegen dit kabinet:
	http://www.sp.nl/





More information about the Python-list mailing list