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
802a484e
Kaydet (Commit)
802a484e
authored
Kas 26, 2013
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
tracemalloc: Fix hash methods of Statistic and StatisticDiff
üst
5831882c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
tracemalloc.py
Lib/tracemalloc.py
+3
-4
No files found.
Lib/tracemalloc.py
Dosyayı görüntüle @
802a484e
...
@@ -39,7 +39,7 @@ class Statistic:
...
@@ -39,7 +39,7 @@ class Statistic:
self
.
count
=
count
self
.
count
=
count
def
__hash__
(
self
):
def
__hash__
(
self
):
return
(
self
.
traceback
,
self
.
size
,
self
.
count
)
return
hash
((
self
.
traceback
,
self
.
size
,
self
.
count
)
)
def
__eq__
(
self
,
other
):
def
__eq__
(
self
,
other
):
return
(
self
.
traceback
==
other
.
traceback
return
(
self
.
traceback
==
other
.
traceback
...
@@ -79,8 +79,8 @@ class StatisticDiff:
...
@@ -79,8 +79,8 @@ class StatisticDiff:
self
.
count_diff
=
count_diff
self
.
count_diff
=
count_diff
def
__hash__
(
self
):
def
__hash__
(
self
):
return
(
self
.
traceback
,
self
.
size
,
self
.
size_diff
,
return
hash
(
(
self
.
traceback
,
self
.
size
,
self
.
size_diff
,
self
.
count
,
self
.
count_diff
)
self
.
count
,
self
.
count_diff
)
)
def
__eq__
(
self
,
other
):
def
__eq__
(
self
,
other
):
return
(
self
.
traceback
==
other
.
traceback
return
(
self
.
traceback
==
other
.
traceback
...
@@ -104,7 +104,6 @@ class StatisticDiff:
...
@@ -104,7 +104,6 @@ class StatisticDiff:
def
__repr__
(
self
):
def
__repr__
(
self
):
return
(
'<StatisticDiff traceback=
%
r size=
%
i (
%+
i) count=
%
i (
%+
i)>'
return
(
'<StatisticDiff traceback=
%
r size=
%
i (
%+
i) count=
%
i (
%+
i)>'
%
(
self
.
traceback
,
self
.
size
,
self
.
size_diff
,
%
(
self
.
traceback
,
self
.
size
,
self
.
size_diff
,
self
.
count
,
self
.
count_diff
))
self
.
count
,
self
.
count_diff
))
def
_sort_key
(
self
):
def
_sort_key
(
self
):
...
...
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