468,556 Members | 2,135 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,556 developers. It's quick & easy.

private attributes in __slots__ and pickle

Hello,
I've just discovered the hard way that classes declaring private variables
(beginning with two underscore) can not be pickled ; double underscored
attributes are just not returned by __reduce__.

That's very annoying.

Objects should be serializable transparently so why such obstacles ?
Jul 18 '05 #1
1 1666
i_****@spams.biz wrote:
Hello,
I've just discovered the hard way that classes declaring private variables
(beginning with two underscore) can not be pickled ; double underscored
I meant "declaring private attributes in __slots__" ; sorry.
attributes are just not returned by __reduce__.

That's very annoying.

Objects should be serializable transparently so why such obstacles ?


Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Alex | last post: by
1 post views Thread by George Sakkis | last post: by
2 posts views Thread by Ewald R. de Wit | last post: by
6 posts views Thread by Samuel M. Smith | last post: by
3 posts views Thread by redefined.horizons | last post: by
23 posts views Thread by Frank Millman | last post: by
3 posts views Thread by JL | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.