Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9afdaffa
Commit
9afdaffa
authored
Oct 31, 2007
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify the reasons why pickle is almost always better than marshal
parent
9b12e001
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
Doc/lib/libmarshal.tex
Doc/lib/libmarshal.tex
+9
-1
No files found.
Doc/lib/libmarshal.tex
View file @
9afdaffa
...
...
@@ -26,7 +26,9 @@ mainly to support reading and writing the ``pseudo-compiled'' code for
Python modules of
\file
{
.pyc
}
files. Therefore, the Python
maintainers reserve the right to modify the marshal format in backward
incompatible ways should the need arise. If you're serializing and
de-serializing Python objects, use the
\module
{
pickle
}
module instead.
de-serializing Python objects, use the
\module
{
pickle
}
module instead
--- the performance is comparable, version independence is guaranteed,
and pickle supports a substantially wider range of objects than marshal.
\refstmodindex
{
pickle
}
\refstmodindex
{
shelve
}
\obindex
{
code
}
...
...
@@ -47,6 +49,12 @@ dictionaries are only supported as long as the values contained
therein are themselves supported; and recursive lists and dictionaries
should not be written (they will cause infinite loops).
\begin{notice}
[warning]
Some unsupported types such as subclasses of builtins will appear to marshal
and unmarshal correctly, but in fact, their type will change and the
additional subclass functionality and instance attributes will be lost.
\end{notice}
\strong
{
Caveat:
}
On machines where C's
\code
{
long int
}
type has more than
32 bits (such as the DEC Alpha), it is possible to create plain Python
integers that are longer than 32 bits.
...
...
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