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
9bcb1127
Kaydet (Commit)
9bcb1127
authored
Ara 07, 2013
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Mention pickle protocol 4, and some tweaks.
üst
9858e8b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
pickle.rst
Doc/library/pickle.rst
+18
-7
No files found.
Doc/library/pickle.rst
Dosyayı görüntüle @
9bcb1127
...
...
@@ -94,6 +94,9 @@ There are fundamental differences between the pickle protocols and
The :mod:`json` module: a standard library module allowing JSON
serialization and deserialization.
.. _pickle-protocols:
Data stream format
------------------
...
...
@@ -125,10 +128,15 @@ There are currently 4 different protocols which can be used for pickling.
efficient pickling of :term:`new-style class`\es. Refer to :pep:`307` for
information about improvements brought by protocol 2.
* Protocol version 3 was added in Python 3. It has explicit support for
* Protocol version 3 was added in Python 3.
0.
It has explicit support for
:class:`bytes` objects and cannot be unpickled by Python 2.x. This is
the default as well as the current recommended protocol; use it whenever
possible.
the default protocol, and the recommended protocol when compatibility with
other Python 3 versions is required.
* Protocol version 4 was added in Python 3.4. It adds support for very large
objects, pickling more kinds of objects, and some data format
optimizations. Refer to :pep:`3154` for information about improvements
brought by protocol 4.
.. note::
Serialization is a more primitive notion than persistence; although
...
...
@@ -156,13 +164,16 @@ The :mod:`pickle` module provides the following constants:
.. data:: HIGHEST_PROTOCOL
The highest protocol version available. This value can be passed as a
*protocol* value.
An integer, the highest :ref:`protocol version <pickle-protocols>`
available. This value can be passed as a *protocol* value to functions
:func:`dump` and :func:`dumps` as well as the :class:`Pickler`
constructor.
.. data:: DEFAULT_PROTOCOL
The default protocol used for pickling. May be less than HIGHEST_PROTOCOL.
Currently the default protocol is 3, a new protocol designed for Python 3.0.
An integer, the default :ref:`protocol version <pickle-protocols>` used
for pickling. May be less than :data:`HIGHEST_PROTOCOL`. Currently the
default protocol is 3, a new protocol designed for Python 3.0.
The :mod:`pickle` module provides the following functions to make the pickling
...
...
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