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
909a6f62
Kaydet (Commit)
909a6f62
authored
Mar 18, 2017
tarafından
Marco Buttu
Kaydeden (comit)
Berker Peksag
Mar 18, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-27200: Fix doctests in programming.rst and datetime.rst (#401)
üst
993d4b34
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
conf.py
Doc/conf.py
+1
-0
programming.rst
Doc/faq/programming.rst
+2
-2
tzinfo_examples.py
Doc/includes/tzinfo_examples.py
+0
-0
datetime.rst
Doc/library/datetime.rst
+7
-3
No files found.
Doc/conf.py
Dosyayı görüntüle @
909a6f62
...
...
@@ -8,6 +8,7 @@
import
sys
,
os
,
time
sys
.
path
.
append
(
os
.
path
.
abspath
(
'tools/extensions'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'includes'
))
# General configuration
# ---------------------
...
...
Doc/faq/programming.rst
Dosyayı görüntüle @
909a6f62
...
...
@@ -1849,7 +1849,7 @@ containing statements like ::
will continue to work with the old version of the imported objects. If the
module contains class definitions, existing class instances will *not* be
updated to use the new class definition. This can result in the following
paradoxical behaviour:
paradoxical behaviour:
:
>>> import importlib
>>> import cls
...
...
@@ -1860,7 +1860,7 @@ paradoxical behaviour:
False
The nature of the problem is made clear if you print out the "identity" of the
class objects:
class objects:
:
>>> hex(id(c.__class__))
'0x7352a0'
...
...
Doc/includes/tzinfo
-
examples.py
→
Doc/includes/tzinfo
_
examples.py
Dosyayı görüntüle @
909a6f62
File moved
Doc/library/datetime.rst
Dosyayı görüntüle @
909a6f62
...
...
@@ -1221,7 +1221,7 @@ Instance methods:
>>> from datetime import datetime
>>> datetime.now().isoformat(timespec='minutes')
>>> datetime.now().isoformat(timespec='minutes')
# doctest: +SKIP
'2002-12-25T00:00'
>>> dt = datetime(2015, 1, 1, 12, 30, 59, 0)
>>> dt.isoformat(timespec='microseconds')
...
...
@@ -1781,9 +1781,11 @@ There is one more :class:`tzinfo` method that a subclass may wish to override:
else:
return dt
Example :class:`tzinfo` classes:
In the following :download:`tzinfo_examples.py
<../includes/tzinfo_examples.py>` file there are some examples of
:class:`tzinfo` classes:
.. literalinclude:: ../includes/tzinfo
-
examples.py
.. literalinclude:: ../includes/tzinfo
_
examples.py
Note that there are unavoidable subtleties twice per year in a :class:`tzinfo`
subclass accounting for both standard and daylight time, at the DST transition
...
...
@@ -1804,6 +1806,8 @@ When DST starts (the "start" line), the local wall clock leaps from 1:59 to
``astimezone(Eastern)`` won't deliver a result with ``hour == 2`` on the day DST
begins. For example, at the Spring forward transition of 2016, we get
>>> from datetime import datetime, timezone
>>> from tzinfo_examples import HOUR, Eastern
>>> u0 = datetime(2016, 3, 13, 5, tzinfo=timezone.utc)
>>> for i in range(4):
... u = u0 + i*HOUR
...
...
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