[Python-Dev] Broken strptime in Python 2.3a1 & CVS

Guido van Rossum guido@python.org
Tue, 14 Jan 2003 09:18:34 -0500


> > > I think we should lose the C version of strptime and use
> > > _strptime.py everywhere now -- allowing x-platform accidents to
> > > sneak thru is un-Pythonic (unless they're *valuable* x-platform
> > > accidents <wink> -- strptime accidents are random crap).
> >
> > Guess what.  Through clever use of the time-machine, we *are* using
> > _strptime.py everwhere now.  There's an #undef HAVE_STRPTIME in
> > timemodule.c.
> 
> I need one of those new-fangled time-machines.  Sure seem handy.  =)

We still need to make a final decision about this.  Instead of #undef
HAVE_STRPTIME, the code in timemodule.c that uses _strptime.py should
simply be included unconditionally.

Arguments for always using _strptime.py:

  - consistency across platforms

  - avoids buggy or non-conforming platform strptime() implementations

Arguments for using the platform strptime() if it exists:

  - speed

  - may contain platform-specific extensions

  - consistency with other apps on the same platform

--Guido van Rossum (home page: http://www.python.org/~guido/)