[Python-checkins] python/dist/src/Doc/lib libdatetime.tex,1.5,1.6

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
2002年12月24日 08:31:01 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv29425/python/Doc/lib
Modified Files:
	libdatetime.tex 
Log Message:
Added note about technical pickle limitation on tzinfo instances.
Index: libdatetime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** libdatetime.tex	24 Dec 2002 16:25:29 -0000	1.5
--- libdatetime.tex	24 Dec 2002 16:30:58 -0000	1.6
***************
*** 756,762 ****
 date or time object passed to them.
 
 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
 implement all of them. The methods are called by a \class{datetimetz}
 or \class{timetz} object, passing itself as the argument. A
--- 756,767 ----
 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 \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

AltStyle によって変換されたページ (->オリジナル) /