Python 2.2.1 (#1, Sep 9 2002, 09:26:21)
[GCC 3.2 (Mandrake Linux 9.0 3.2-1mdk)] on linux-i386
Type "help", "copyright", "credits" or
"license" for
more information.
>>> from fixedpoint import FixedPoint
>>> x = FixedPoint("1.234")
>>> print x
1.23
>>> import pickle
>>> f = open("foo", 'w')
>>> pickle.dump(f, x)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/pickle.py", line 973, in dump
Pickler(file, bin).dump(object)
File "/usr/lib/python2.2/pickle.py", line 110, in
__init__
self.write = file.write
AttributeError: 'FixedPoint' object has no attribute
'write'
>>> import cPickle
>>> cPickle.dump(f, x)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: argument must have 'write' attribute
>>>
Nobody/Anonymous
None
None
Public
|
Date: 2004-05-28 14:35 Logged In: YES |
|
Date: 2003-07-24 18:56 Logged In: YES |