Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
ad4e11e1
Kaydet (Commit)
ad4e11e1
authored
Eyl 30, 2006
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Bug #1566663: remove obsolete example from datetime docs.
(backport from rev. 52063)
üst
506cc189
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
16 deletions
+20
-16
libdatetime.tex
Doc/lib/libdatetime.tex
+18
-16
NEWS
Misc/NEWS
+2
-0
No files found.
Doc/lib/libdatetime.tex
Dosyayı görüntüle @
ad4e11e1
...
@@ -1421,19 +1421,21 @@ The exact range of years for which \method{strftime()} works also
...
@@ -1421,19 +1421,21 @@ The exact range of years for which \method{strftime()} works also
varies across platforms. Regardless of platform, years before 1900
varies across platforms. Regardless of platform, years before 1900
cannot be used.
cannot be used.
\subsection
{
Examples
}
%%% This example is obsolete, since strptime is now supported by datetime.
%
\subsubsection
{
Creating Datetime Objects from Formatted Strings
}
% \subsection{Examples}
%
The
\class
{
datetime
}
class does not directly support parsing formatted time
% \subsubsection{Creating Datetime Objects from Formatted Strings}
strings. You can use
\function
{
time.strptime
}
to do the parsing and create
%
a
\class
{
datetime
}
object from the tuple it returns:
% The \class{datetime} class does not directly support parsing formatted time
% strings. You can use \function{time.strptime} to do the parsing and create
\begin{verbatim}
% a \class{datetime} object from the tuple it returns:
>>> s = "2005-12-06T12:13:14"
%
>>> from datetime import datetime
% \begin{verbatim}
>>> from time import strptime
% >>> s = "2005-12-06T12:13:14"
>>> datetime(*strptime(s, "
%Y-%m-%dT%H:%M:%S")[0:6])
% >>> from datetime import datetime
datetime.datetime(2005, 12, 6, 12, 13, 14)
% >>> from time import strptime
\end{verbatim}
% >>> datetime(*strptime(s, "%Y-%m-%dT%H:%M:%S")[0:6])
% datetime.datetime(2005, 12, 6, 12, 13, 14)
% \end{verbatim}
%
Misc/NEWS
Dosyayı görüntüle @
ad4e11e1
...
@@ -151,6 +151,8 @@ Tests
...
@@ -151,6 +151,8 @@ Tests
Documentation
Documentation
-------------
-------------
- Bug #1566663: remove obsolete example from datetime docs.
- Bug #1541682: Fix example in the "Refcount details" API docs.
- Bug #1541682: Fix example in the "Refcount details" API docs.
Additionally, remove a faulty example showing PySequence_SetItem applied
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
.
to a newly created list object and add notes that this isn'
t
a
good
idea
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment