durusmail: durus-users: README example does not work
README example does not work
2004-07-31
2004-07-31
RELEASED: Durus 1.0
2004-07-31
unable to persist stuff from client.py with 1 character python filename?
2004-07-31
Re: unable to persist stuff from client.py with 1 character python filename?
2004-07-31
README example does not work
Ludovico Magnocavallo
2004-07-31
The example of subclassing Persistent in the README does not work:

 >>> connection

 >>> root

 >>> class A(Persistent):
....  pass
....
 >>> x = A()
 >>> root["sample"] = x
 >>> root['sample']

 >>> connection.commit()
Traceback (most recent call last):
   File "", line 1, in ?
   File "/usr/lib/python2.3/site-packages/durus/connection.py", line
227, in commit
     data, refs = writer.get_state(obj)
   File "/usr/lib/python2.3/site-packages/durus/serialize.py", line 108,
in get_state
     self.pickler.dump(obj.__getstate__())
PicklingError: Can't pickle : attribute lookup __builtin__.A
failed
 >>>

What am I missing?

Ludo

reply