durusmail: durus-users: Re: Why Persistent subclases are not working from "durus -c"?
Why Persistent subclases are not working from "durus -c"?
2006-04-24
Re: Why Persistent subclases are not working from "durus -c"?
2006-04-24
2006-05-08
2006-05-12
Re: Why Persistent subclases are not working from "durus -c"?
Jesus Cea
2006-04-24
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil Schemenauer wrote:
> You've created the class in an interactive session.  The unpickler
> will not be able to load it (and I guess it can't be pickled
> either).

I see that. But why?. Without using "durus -c" I can pickle "interactive
classes":

[jcea@yolco video]$ python
Python 2.4.3 (#1, Apr  4 2006, 22:38:10)
[GCC 4.1.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pickle
>>> class a :
....   pass
....
>>> b=a()
>>> pickle.dumps(b)
'(i__main__\na\np0\n(dp1\nb.'
>>>

Yes, I know that pickling an interactive class is silly, but I was just
doing some experiments and find that error strange. I don't see why I'm
seeing it :-?

- --
Jesus Cea Avion                         _/_/      _/_/_/        _/_/_/
jcea@argo.es http://www.argo.es/~jcea/ _/_/    _/_/  _/_/    _/_/  _/_/
jabber / xmpp:jcea@jabber.org         _/_/    _/_/          _/_/_/_/_/
                               _/_/  _/_/    _/_/          _/_/  _/_/
"Things are not so easy"      _/_/  _/_/    _/_/  _/_/    _/_/  _/_/
"My name is Dump, Core Dump"   _/_/_/        _/_/_/      _/_/  _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRE1hnJlgi5GaxT1NAQJ5pQP/S2N7c5EoGKZkcdRfHivlpX2vofSCLPdV
tSoU/z34BO6mfzn21zIGJ8vS6d8ZITnrsUQHFYHHpaS3hyJwHs/ocRVJ+jeMv/x4
TS/4ugotORu9V8xgSsNdDmVP3b8QgX7eLNagRCFzzm+5VTebs7QdL4/k9B1FjHyf
EbUw9qqYmqk=
=zVuz
-----END PGP SIGNATURE-----
reply