I'm confused. I was going to try linkchecker, and it dies with a
traceback ending in
File "/usr/local/lib/python2.4/calendar.py", line 32, in _localized_mont h
_months = [datetime.date(2 001, i+1, 1).strftime for i in range(12)]
AttributeError: 'module' object has no attribute 'date'
Sure enough, there is no datetime.date, but there is a datetime.Date:
Python 2.4 (#2, Feb 19 2005, 20:35:23)
[GCC 3.4.2 [FreeBSD] 20040728] on freebsd5
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> import datetime
>>> dir(datetime)[/color][/color][/color]
['Date', 'DateTime', ...]
However, the Library Reference clearly states that datetime.date
should exist. Granted, it's been a while since I used python in
anger, but isn't this what it says?
Moreover, the datetime.date class is supposed to have a strftime()
method. datetime.Date does not.
I'm beginning to wonder if the FreeBSD python package is at fault.
Or what is really going on here?
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.n o/~hanche/>
- Debating gives most of us much more psychological satisfaction
than thinking does: but it deprives us of whatever chance there is
of getting closer to the truth. -- C.P. Snow
traceback ending in
File "/usr/local/lib/python2.4/calendar.py", line 32, in _localized_mont h
_months = [datetime.date(2 001, i+1, 1).strftime for i in range(12)]
AttributeError: 'module' object has no attribute 'date'
Sure enough, there is no datetime.date, but there is a datetime.Date:
Python 2.4 (#2, Feb 19 2005, 20:35:23)
[GCC 3.4.2 [FreeBSD] 20040728] on freebsd5
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> import datetime
>>> dir(datetime)[/color][/color][/color]
['Date', 'DateTime', ...]
However, the Library Reference clearly states that datetime.date
should exist. Granted, it's been a while since I used python in
anger, but isn't this what it says?
Moreover, the datetime.date class is supposed to have a strftime()
method. datetime.Date does not.
I'm beginning to wonder if the FreeBSD python package is at fault.
Or what is really going on here?
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.n o/~hanche/>
- Debating gives most of us much more psychological satisfaction
than thinking does: but it deprives us of whatever chance there is
of getting closer to the truth. -- C.P. Snow
Comment