design question: no new attributes
Larry Bates
lbates at websafe.com
Mon Feb 26 17:23:30 EST 2007
Alan Isaac wrote:
> I have a class whose instances should only receive attribute
> assignments for attributes that were created at inititialization.
> If slots are not appropriate, what is the Pythonic design for this?
>
> Thanks,
> Alan Isaac
>
>
My understanding of "Pythonic design" is not to worry about it.
If users want to set attributes that won't accomplish anything
productive (within your class) let them.
-Larry
More information about the Python-list
mailing list