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
256cbd74
Commit
256cbd74
authored
Feb 16, 1995
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minute comment changes
parent
a8db1df6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
Lib/pickle.py
Lib/pickle.py
+3
-3
Lib/shelve.py
Lib/shelve.py
+1
-1
No files found.
Lib/pickle.py
View file @
256cbd74
...
...
@@ -84,7 +84,7 @@ that suitable conversions can be made by the class's __setstate__ method.
The interface is as follows:
To pickle an object x onto a file f
.
open for writing:
To pickle an object x onto a file f
,
open for writing:
p = pickle.Pickler(f)
p.dump(x)
...
...
@@ -106,7 +106,7 @@ The following types can be pickled:
- None
- integers, long integers, floating point numbers
- strings
- tuples, lists and dictionaries containing picklable objects
- tuples, lists and dictionaries containing
only
picklable objects
- class instances whose __dict__ or __setstate__() is picklable
Attempts to pickle unpicklable objects will raise an exception
...
...
@@ -114,7 +114,7 @@ after having written an unspecified number of bytes to the file argument.
It is possible to make multiple calls to Pickler.dump() or to
Unpickler.load(), as long as there is a one-to-one correspondence
betwee pickler and Unpickler objects and between dump and load calls
betwee
n
pickler and Unpickler objects and between dump and load calls
for any pair of corresponding Pickler and Unpicklers. WARNING: this
is intended for pickleing multiple objects without intervening modifications
to the objects or their parts. If you modify an object and then pickle
...
...
Lib/shelve.py
View file @
256cbd74
...
...
@@ -11,7 +11,7 @@ To summarize the interface (key is a string, data is an arbitrary
object):
import shelve
d = shelve.open(filename)
# open, with (g)dbm filename
d = shelve.open(filename)
# open, with (g)dbm filename -- no suffix
d[key] = data # store data at key (overwrites old data if
# using an existing key)
...
...
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