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
cd5d765b
Kaydet (Commit)
cd5d765b
authored
Eyl 08, 2015
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
cleanup datetime code
remove scories of round half up code and debug code.
üst
7667f581
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
8 deletions
+1
-8
datetime.py
Lib/datetime.py
+0
-7
datetimetester.py
Lib/test/datetimetester.py
+1
-1
No files found.
Lib/datetime.py
Dosyayı görüntüle @
cd5d765b
...
...
@@ -316,13 +316,6 @@ def _divide_and_round(a, b):
return
q
def
_round_half_up
(
x
):
"""Round to nearest with ties going away from zero."""
if
x
>=
0.0
:
return
_math
.
floor
(
x
+
0.5
)
else
:
return
_math
.
ceil
(
x
-
0.5
)
class
timedelta
:
"""Represent the difference between two datetime objects.
...
...
Lib/test/datetimetester.py
Dosyayı görüntüle @
cd5d765b
...
...
@@ -679,7 +679,7 @@ class TestTimeDelta(HarmlessMixedComparison, unittest.TestCase):
us_per_day
=
us_per_hour
*
24
eq
(
td
(
days
=.
4
/
us_per_day
),
td
(
0
))
eq
(
td
(
hours
=.
2
/
us_per_hour
),
td
(
0
))
eq
(
td
(
days
=.
4
/
us_per_day
,
hours
=.
2
/
us_per_hour
),
td
(
microseconds
=
1
)
,
td
)
eq
(
td
(
days
=.
4
/
us_per_day
,
hours
=.
2
/
us_per_hour
),
td
(
microseconds
=
1
))
eq
(
td
(
days
=-.
4
/
us_per_day
),
td
(
0
))
eq
(
td
(
hours
=-.
2
/
us_per_hour
),
td
(
0
))
...
...
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