__slot__: what is it good for?

Stephen Hansen me+list/python at ixokai.io
Mon Jun 21 11:24:22 EDT 2010


On 6/21/10 8:08 AM, Stephen Hansen wrote:
> If you don't want a class to have attributes added at runtime, the
> Pythonic way to achieve that is to... simply add attributes at runtime.

Errr.

The Pythonic way to achieve that is to... simply NOT add attributes at
runtime.

I.e., choose to follow the rule you've decided on.

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100621/9f4163aa/attachment.sig>


More information about the Python-list mailing list