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
e9cfcef7
Kaydet (Commit)
e9cfcef7
authored
Kas 27, 2002
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clarify the interpretation of the __getstate__() return value for
new-style classes. Closes SF bug #637941.
üst
a01fa263
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
libpickle.tex
Doc/lib/libpickle.tex
+9
-3
No files found.
Doc/lib/libpickle.tex
Dosyayı görüntüle @
e9cfcef7
...
...
@@ -412,13 +412,19 @@ Upon unpickling, if the class also defines the method
\method
{__
setstate
__
()
}
, it is called with the unpickled
state
\footnote
{
These methods can also be used to implement copying
class instances.
}
. If there is no
\method
{__
setstate
__
()
}
method, the
pickled
object
must be a dictionary and its items are assigned to the
pickled
state
must be a dictionary and its items are assigned to the
new instance's dictionary. If a class defines both
\method
{__
getstate
__
()
}
and
\method
{__
setstate
__
()
}
, the state object
needn't be a dictionary and these methods can do what they
want
\footnote
{
This protocol is also used by the shallow and deep
want
.
\footnote
{
This protocol is also used by the shallow and deep
copying operations defined in the
\refmodule
{
copy
}
module.
}
.
\refmodule
{
copy
}
module.
}
\begin{notice}
[warning]
For new-style classes, if
\method
{__
getstate
__
()
}
returns a false
value, the
\method
{__
setstate
__
()
}
method will not be called.
\end{notice}
\subsubsection
{
Pickling and unpickling extension types
}
...
...
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