[Python-checkins] r52064 - in python/branches/release25-maint: Doc/lib/libdatetime.tex Misc/NEWS

georg.brandl python-checkins at python.org
Sat Sep 30 11:06:49 CEST 2006


Author: georg.brandl
Date: Sat Sep 30 11:06:49 2006
New Revision: 52064

Modified:
   python/branches/release25-maint/Doc/lib/libdatetime.tex
   python/branches/release25-maint/Misc/NEWS
Log:
Bug #1566663: remove obsolete example from datetime docs.
 (backport from rev. 52063)

Modified: python/branches/release25-maint/Doc/lib/libdatetime.tex
==============================================================================
--- python/branches/release25-maint/Doc/lib/libdatetime.tex	(original)
+++ python/branches/release25-maint/Doc/lib/libdatetime.tex	Sat Sep 30 11:06:49 2006
@@ -1421,19 +1421,21 @@
 varies across platforms.  Regardless of platform, years before 1900
 cannot be used.
 
-\subsection{Examples}
-
-\subsubsection{Creating Datetime Objects from Formatted Strings}
-
-The \class{datetime} class does not directly support parsing formatted time
-strings.  You can use \function{time.strptime} to do the parsing and create
-a \class{datetime} object from the tuple it returns:
-
-\begin{verbatim}
->>> s = "2005-12-06T12:13:14"
->>> from datetime import datetime
->>> from time import strptime
->>> datetime(*strptime(s, "%Y-%m-%dT%H:%M:%S")[0:6])
-datetime.datetime(2005, 12, 6, 12, 13, 14)
-\end{verbatim}
-
+%%% This example is obsolete, since strptime is now supported by datetime.
+% 
+% \subsection{Examples}
+% 
+% \subsubsection{Creating Datetime Objects from Formatted Strings}
+% 
+% The \class{datetime} class does not directly support parsing formatted time
+% strings.  You can use \function{time.strptime} to do the parsing and create
+% a \class{datetime} object from the tuple it returns:
+% 
+% \begin{verbatim}
+% >>> s = "2005-12-06T12:13:14"
+% >>> from datetime import datetime
+% >>> from time import strptime
+% >>> datetime(*strptime(s, "%Y-%m-%dT%H:%M:%S")[0:6])
+% datetime.datetime(2005, 12, 6, 12, 13, 14)
+% \end{verbatim}
+% 

Modified: python/branches/release25-maint/Misc/NEWS
==============================================================================
--- python/branches/release25-maint/Misc/NEWS	(original)
+++ python/branches/release25-maint/Misc/NEWS	Sat Sep 30 11:06:49 2006
@@ -151,6 +151,8 @@
 Documentation
 -------------
 
+- Bug #1566663: remove obsolete example from datetime docs.
+
 - Bug #1541682: Fix example in the "Refcount details" API docs.
   Additionally, remove a faulty example showing PySequence_SetItem applied
   to a newly created list object and add notes that this isn't a good idea.


More information about the Python-checkins mailing list