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
d08baa95
Kaydet (Commit)
d08baa95
authored
Şub 21, 2003
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add some notes about HIGHEST_PROTOCOL.
üst
850566b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
libpickle.tex
Doc/lib/libpickle.tex
+15
-4
No files found.
Doc/lib/libpickle.tex
Dosyayı görüntüle @
d08baa95
...
...
@@ -144,8 +144,9 @@ much more efficient pickling of new-style classes.
Refer to PEP 307 for more information.
If a
\var
{
protocol
}
is not specified, protocol 0 is used.
If
\var
{
protocol
}
is specified as a negative value,
the highest protocol version will be used.
If
\var
{
protocol
}
is specified as a negative value
or
\constant
{
HIGHEST
_
PROTOCOL
}
,
the highest protocol version available will be used.
\versionchanged
[The
\var
{
bin
}
parameter is deprecated and only provided
for backwards compatibility. You should use the
\var
{
protocol
}
...
...
@@ -162,6 +163,14 @@ To serialize an object hierarchy, you first create a pickler, then you
call the pickler's
\method
{
dump()
}
method. To de-serialize a data
stream, you first create an unpickler, then you call the unpickler's
\method
{
load()
}
method. The
\module
{
pickle
}
module provides the
following constant:
\begin{datadesc}
{
HIGHEST
_
PROTOCOL
}
The highest protocol version available. This value can be passed
as a
\var
{
protocol
}
value.
\end{datadesc}
The
\module
{
pickle
}
module provides the
following functions to make this process more convenient:
\begin{funcdesc}
{
dump
}{
object, file
\optional
{
, protocol
\optional
{
, bin
}}}
...
...
@@ -170,7 +179,8 @@ Write a pickled representation of \var{object} to the open file object
\code
{
Pickler(
\var
{
file
}
,
\var
{
protocol
}
,
\var
{
bin
}
).dump(
\var
{
object
}
)
}
.
If the
\var
{
protocol
}
parameter is ommitted, protocol 0 is used.
If
\var
{
protocol
}
is specified as a negative value,
If
\var
{
protocol
}
is specified as a negative value
or
\constant
{
HIGHEST
_
PROTOCOL
}
,
the highest protocol version will be used.
\versionchanged
[The
\var
{
protocol
}
parameter was added.
...
...
@@ -209,7 +219,8 @@ Return the pickled representation of the object as a string, instead
of writing it to a file.
If the
\var
{
protocol
}
parameter is ommitted, protocol 0 is used.
If
\var
{
protocol
}
is specified as a negative value,
If
\var
{
protocol
}
is specified as a negative value
or
\constant
{
HIGHEST
_
PROTOCOL
}
,
the highest protocol version will be used.
\versionchanged
[The
\var
{
protocol
}
parameter was added.
...
...
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