[Python-Dev] Make _strptime only time.strptime implementation? (original) (raw)

Tim Peters tim@zope.com
Fri, 9 May 2003 10:30:34 -0400


[Tim]

Nobody has even cut a little gas yet, so I'd proceed under the assumption that nobody will, and that the disable HAVESTRTIME code will be physically deleted.

[Kevin Jacobs]

Actually, I did, and on python-dev.

Sorry, I meant since 2.3b1 was released. It's the purpose of pre-releases to find problems, and the whineometer gets reset when a new pre-release goes out.

strptime did not roundtrip correctly with mktime on Linux.

It was my understanding (possibly wrong, and please correct me if it is) that Brett fixed this.

This made my application very unhappy, so I removed all calls to strptime. Right now I don't have a vested interest in shooting holes in the Python strptime, but I can't say I feel any warm fuzzies aboutit. It seems hard to imagine that others will not run into similar problems, regardless of the lack of specification for exactly how strptime aught to work.

The primary problem isn't the lack of a crisp spec, although that's the root cause of the real problem: the problem is that how strptime behaves varies in fact across boxes. I don't expect anyone could have felt warm fuzzies about that either, although someone could fool themself into hoping that the platform strptime behavior they happened to get was the only behavior their app would ever see. With a single implementation of strptime across platforms, that pleasant fantasy gets close to becoming the truth. Python is supposed to be a little less platform-dependent than C .