Bug in time module?
lec
englim at pc.jaring.my
Wed Sep 8 12:20:03 EDT 1999
Gordon McMillan wrote:
>
> The only editing Python's time module does is to ensure that you've
> passed the right number and kind of args. Everything else is the
> result of your platform's implementation of strptime. If you want
> something _good_, you should probably use MA Lemburg's mxDateTime.
>
> - Gordon
Consider the following exception raised:
Python 1.5.2 (#1, Apr 18 1999, 16:03:16) [GCC pgcc-2.91.60 19981201
(egcs-1.1.1 on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import time
>>> time.strptime('31/13/1999', "%d/%m/%Y")
Traceback (innermost last):
File "<stdin>", line 1, in ?
ValueError: format mismatch
Shouldn't the same exception be raised for time.strptime('31/02/1999',
"%d/%m/%Y") ?
More information about the Python-list
mailing list