datetime.datetime.strptime отсутствует в Python 2.4.1

Наша команда должна использовать Python 2.4.1 в определенных обстоятельствах. strptime отсутствует в модуле datetime.datetime в Python 2.4.1:

Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.strptime
Traceback (most recent call last):
  File "<string>", line 1, in <fragment>
AttributeError: type object 'datetime.datetime' has no attribute 'strptime'

В отличие от 2.6:

Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.strptime
<built-in method strptime of type object at 0x1E1EF898>

При вводе я обнаружил его в модуль времени 2.4.1:

Python 2.4.1 (#65, Mar 30 2005, 09:16:17) [MSC v.1310 32 bit (Intel)]
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strptime
<built-in function strptime>

Я так понимаю, что strptime в какой-то момент переместился? Как лучше всего проверять такие вещи. Я попытался просмотреть историю выпусков Python, но ничего не нашел.

11
задан eat 7 April 2011 в 18:35
поделиться