Commit 1c4ad726 authored by chris's avatar chris

*** empty log message ***

parent 5d6cef3a
# $Id: pickle.py,v 1.2 1997/01/02 22:22:19 chris Exp $ # $Id: pickle.py,v 1.3 1997/01/03 16:23:02 chris Exp $
# #
# Copyright # Copyright
# #
...@@ -756,33 +756,31 @@ class C: ...@@ -756,33 +756,31 @@ class C:
def test(): def test():
fn = 'out' fn = 'out'
# c = C() c = C()
# c.foo = 1 c.foo = 1
# c.bar = 2 c.bar = 2
# c2 = C() c2 = C()
# x = [0, 1, 2, 3] x = [0, 1, 2, 3]
# y = ('abc', 'abc', c, c) y = ('abc', 'abc', c, c)
# x.append(y) x.append(y)
# x.append(y) x.append(y)
# x.append(5) x.append(5)
# x.append(c2) x.append(c2)
# f = open(fn, 'w') f = open(fn, 'w')
# F = Pickler(f) F = Pickler(f)
# F.dump(x) F.dump(x)
# f.close() f.close()
# del F
f = open(fn, 'r') f = open(fn, 'r')
U = Unpickler(f) U = Unpickler(f)
x2 = U.load() x2 = U.load()
# print x print x
# print x2 print x2
# print x == x2 print x == x2
# print map(id, x) print map(id, x)
# print map(id, x2) print map(id, x2)
# print F.memo print F.memo
print U.memo print U.memo
# return x, x2, F, U
if __name__ == '__main__': if __name__ == '__main__':
test() test()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment