mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Remark about datetime tzinfo examples.
This commit is contained in:
parent
8827d0c338
commit
7702304885
1 changed files with 6 additions and 3 deletions
|
@ -32,11 +32,14 @@ Extension modules
|
||||||
ValueError is raised if tz.dst(dt) returns None (2.3a1 treated it
|
ValueError is raised if tz.dst(dt) returns None (2.3a1 treated it
|
||||||
as 0 instead).
|
as 0 instead).
|
||||||
|
|
||||||
The tzinfo methods utcoffset() and dst() must return a timedelta object
|
The tzinfo methods utcoffset() and dst() must return a timedelta object
|
||||||
(or None) now. In 2.3a1 they could also return an int or long, but that
|
(or None) now. In 2.3a1 they could also return an int or long, but that
|
||||||
was an unhelpfully redundant leftover from an earlier version wherein
|
was an unhelpfully redundant leftover from an earlier version wherein
|
||||||
they couldn't return a timedelta. TOOWTDI.
|
they couldn't return a timedelta. TOOWTDI.
|
||||||
|
|
||||||
|
The example tzinfo class for local time had a bug. It was replaced
|
||||||
|
by a later example coded by Guido.
|
||||||
|
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue