Added note about technical pickle limitation on tzinfo instances.
authorTim Peters <tim.peters@gmail.com>
Tue, 24 Dec 2002 16:30:58 +0000 (16:30 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 24 Dec 2002 16:30:58 +0000 (16:30 +0000)
Doc/lib/libdatetime.tex

index 82c852dd769ae4b29a77d7d895844de0dfe84a3d..b061d90853947708732e6a90edb71e29fa103cfd 100644 (file)
@@ -755,9 +755,14 @@ The latter objects view their fields as being in local time, and the
 from UTC, the name of the time zone, and DST offset, all relative to a
 date or time object passed to them.
 
+Special requirement for pickling:  A tzinfo subclass must have an
+\method{__init__} method that can be called with no arguments, else it
+can be pickled but possibly not unpickled again.  This is a technical
+requirement that may be relaxed in the future.
+
 A concrete subclass of \class{tzinfo} may need to implement the
 following methods.  Exactly which methods are needed depends on the
-uses made of aware \class{datetime} objects; if in doubt, simply
+uses made of aware \module{datetime} objects; if in doubt, simply
 implement all of them.  The methods are called by a \class{datetimetz}
 or \class{timetz} object, passing itself as the argument.  A
 \class{tzinfo} subclass's methods should be prepared to accept a dt