design question: no new attributes

Michele Simionato michele.simionato at gmail.com
Thu Mar 1 10:21:38 CET 2007


On Feb 26, 10:48 pm, "Alan Isaac" <ais... at american.edu> 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

There is a Cookbook recipe for that:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/252158

 Michele Simionato




More information about the Python-list mailing list