On Fri, 2012-05-18 at 09:53 -0700, Charles Hixson wrote: 
> Does __slots__ make access to variables more efficient?

Absolutely, yes.

> If one uses property() to create a few read-only pseudo-variables, does 
> that negate the efficiency advantages of using __slots__?
> (Somehow I feel the documentation needs a bit of improvement.)

If you are tempted to use property, setattr, etc... then do not use
__slots__.  __slots__ should really only be used for Fly Weight pattern
type work, or at least for objects with a limited scope and will not be
inherited from.

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to