summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-09-30 09:06:45 (GMT)
committerGeorg Brandl <georg@python.org>2006-09-30 09:06:45 (GMT)
commitfb25773862343f19d0b15209697f88122c11a63f (patch)
tree80a68110ab986f986859305eb6445f13a5bad607 /Doc
parent3267d28f9db6f5594167f6262d8882b31542dccf (diff)
downloadcpython-fb25773862343f19d0b15209697f88122c11a63f.zip
cpython-fb25773862343f19d0b15209697f88122c11a63f.tar.gz
cpython-fb25773862343f19d0b15209697f88122c11a63f.tar.bz2
Bug #1566663: remove obsolete example from datetime docs.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libdatetime.tex34
1 files changed, 18 insertions, 16 deletions
diff --git a/Doc/lib/libdatetime.tex b/Doc/lib/libdatetime.tex
index cae5d60..0d2b5bb 100644
--- a/Doc/lib/libdatetime.tex
+++ b/Doc/lib/libdatetime.tex
@@ -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}
+%