__slot__: what is it good for?
Terry Reedy
tjreedy at udel.edu
Mon Jun 21 14:06:10 EDT 2010
On 6/21/2010 11:24 AM, Stephen Hansen wrote:
> On 6/21/10 8:08 AM, Stephen Hansen wrote:
>> If you don't want a class to have attributes added at runtime, the
> 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.
Or add a __setattr__ method, but the above is easier.
--
Terry Jan Reedy
More information about the Python-list
mailing list