Hi,

Say i want create a class with a __slots__ tuple in order to prevent
creation of new attributes from outside the class.

Say i want to serialize instances of this class... With pickle, all is
ok : i can dump an object to a file, then reload it.

With PyYAML, i can dump an object to a file, but trying to reload it fails.

If i comment out the __slots__ tuple, all is fine but, then, the class
is "open"... Is there some magic to have both a __slots__ tuple and a
working yaml.load() ?
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to