Regarding __slots__ and other stuff: A couple of questions

dave berk dave.brk at gmail.com
Thu Mar 27 16:08:20 EDT 2008


sorry, forget all I wrote: I should have read this more thoroughly, it
explained it all
http://www.cafepy.com/article/python_attributes_and_methods/python_attributes_and_methods.htm

<http://www.cafepy.com/article/python_attributes_and_methods/python_attributes_and_methods.html>Descriptors
only works with type objects, not instance. and you can't write from an
instance object to a
class variable. You can only hide it. Also __slots__ works by creating
descriptors in the class and preventing creation of any atrributes in
the class instance, so everything is clear now

Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080327/78ac467a/attachment-0001.html>


More information about the Python-list mailing list