]> granicus.if.org Git - python/commitdiff
Bug #1566663: remove obsolete example from datetime docs.
authorGeorg Brandl <georg@python.org>
Sat, 30 Sep 2006 09:06:49 +0000 (09:06 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 30 Sep 2006 09:06:49 +0000 (09:06 +0000)
 (backport from rev. 52063)

Doc/lib/libdatetime.tex
Misc/NEWS

index cae5d60dc996f5ecd3dc722e7c682b7f300a7da9..0d2b5bb643ffae851003173dbf1c9b97668bd7f2 100644 (file)
@@ -1421,19 +1421,21 @@ The exact range of years for which \method{strftime()} works also
 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}
+% 
index 1024086a7da20bded7b3844af0f47892ba3b0406..6f6d0a42712c7b010ce1436d19f704eeb6b0e532 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -151,6 +151,8 @@ Tests
 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.