New submission from Stephen Kelly <steve...@gmail.com>:

There are several bugs on 

http://docs.python.org/library/datetime.html

Section 8.1.6 references the method rzinfo.dst(), which does not exist. 
Presumably this should be tzinfo.dst().

Section 8.1.4 contains an implementation of a GMT2 timezone. There seems to be 
a bug in the utcoffset() and dst() implementations. The timedelta(hours=2) is 
in the dst() implementation, but it should be in the uctoffset() 
implementation. 

The docs for tzinfo.utcoffset() start with 'Return offset of local time from 
UTC, in minutes east of UTC'. Other methods (eg dst()) also document that the 
unit to return should be 'minutes'. However, all code samples instead return a 
timedelta. The documentation I quoted should instead read 'Return offset of 
local time from UTC as a timedelta, or None'.

----------
assignee: docs@python
components: Documentation
messages: 150272
nosy: docs@python, steveire
priority: normal
severity: normal
status: open
title: datetime documentation typos
versions: Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13666>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to