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
ce654f48
Kaydet (Commit)
ce654f48
authored
May 12, 2013
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #15535: Fix pickling of named tuples.
üst
a6df938f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
collections.py
Lib/collections.py
+4
-0
test_collections.py
Lib/test/test_collections.py
+1
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/collections.py
Dosyayı görüntüle @
ce654f48
...
...
@@ -281,6 +281,10 @@ class {typename}(tuple):
'Return self as a plain tuple. Used by copy and pickle.'
return tuple(self)
def __getstate__(self):
'Exclude the OrderedDict from pickling'
return None
{field_defs}
'''
...
...
Lib/test/test_collections.py
Dosyayı görüntüle @
ce654f48
...
...
@@ -272,6 +272,7 @@ class TestNamedTuple(unittest.TestCase):
q
=
loads
(
dumps
(
p
,
protocol
))
self
.
assertEqual
(
p
,
q
)
self
.
assertEqual
(
p
.
_fields
,
q
.
_fields
)
self
.
assertNotIn
(
b
'OrderedDict'
,
dumps
(
p
,
protocol
))
def
test_copy
(
self
):
p
=
TestNT
(
x
=
10
,
y
=
20
,
z
=
30
)
...
...
Misc/NEWS
Dosyayı görüntüle @
ce654f48
...
...
@@ -16,6 +16,9 @@ Library
- Issue #17666: Fix reading gzip files with an extra field.
- Issue #15535: Fix namedtuple pickles which were picking up the OrderedDict
instead of just the underlying tuple.
What's New in Python 3.2.4?
===========================
...
...
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