diff options
author | Guido van Rossum <guido@python.org> | 1995-02-16 16:30:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-02-16 16:30:50 (GMT) |
commit | 256cbd7487e59361f71937d908be2a231cc1e079 (patch) | |
tree | 5772c5b7e0cca67ceae6472466fa3756a7435966 /Lib | |
parent | a8db1df6aac4782a80c36bf25a8d26c1c327f13e (diff) | |
download | cpython-256cbd7487e59361f71937d908be2a231cc1e079.zip cpython-256cbd7487e59361f71937d908be2a231cc1e079.tar.gz cpython-256cbd7487e59361f71937d908be2a231cc1e079.tar.bz2 |
minute comment changes
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pickle.py | 6 | ||||
-rw-r--r-- | Lib/shelve.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index b5ade57..484f468 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -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 +between 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 diff --git a/Lib/shelve.py b/Lib/shelve.py index a7f289f..deb8e22 100644 --- a/Lib/shelve.py +++ b/Lib/shelve.py @@ -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) |