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
5da8cfb8
Unverified
Kaydet (Commit)
5da8cfb8
authored
Mar 01, 2018
tarafından
Eric V. Smith
Kaydeden (comit)
GitHub
Mar 01, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed incorrect default value for dataclass unsafe_hash. (GH-5949)
üst
3e197c7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dataclasses.py
Lib/dataclasses.py
+2
-2
No files found.
Lib/dataclasses.py
Dosyayı görüntüle @
5da8cfb8
...
@@ -745,7 +745,7 @@ def _process_class(cls, repr, eq, order, unsafe_hash, init, frozen):
...
@@ -745,7 +745,7 @@ def _process_class(cls, repr, eq, order, unsafe_hash, init, frozen):
# underscore. The presence of _cls is used to detect if this
# underscore. The presence of _cls is used to detect if this
# decorator is being called with parameters or not.
# decorator is being called with parameters or not.
def
dataclass
(
_cls
=
None
,
*
,
init
=
True
,
repr
=
True
,
eq
=
True
,
order
=
False
,
def
dataclass
(
_cls
=
None
,
*
,
init
=
True
,
repr
=
True
,
eq
=
True
,
order
=
False
,
unsafe_hash
=
Non
e
,
frozen
=
False
):
unsafe_hash
=
Fals
e
,
frozen
=
False
):
"""Returns the same class as was passed in, with dunder methods
"""Returns the same class as was passed in, with dunder methods
added based on the fields defined in the class.
added based on the fields defined in the class.
...
@@ -880,7 +880,7 @@ def _astuple_inner(obj, tuple_factory):
...
@@ -880,7 +880,7 @@ def _astuple_inner(obj, tuple_factory):
def
make_dataclass
(
cls_name
,
fields
,
*
,
bases
=
(),
namespace
=
None
,
init
=
True
,
def
make_dataclass
(
cls_name
,
fields
,
*
,
bases
=
(),
namespace
=
None
,
init
=
True
,
repr
=
True
,
eq
=
True
,
order
=
False
,
unsafe_hash
=
Non
e
,
repr
=
True
,
eq
=
True
,
order
=
False
,
unsafe_hash
=
Fals
e
,
frozen
=
False
):
frozen
=
False
):
"""Return a new dynamically created dataclass.
"""Return a new dynamically created dataclass.
...
...
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