"Arnaud Delobelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > def __setattr__(self, attr, val): > if hasattr(self, attr): > self.__dict__[attr] = val > else: > # Tell the user off
But then you cannot even set attributes during initialization, right? I want that restriction only after an object is initialized. (I realize that I could condition on an attribute set during initialization, but I am asking for the most elegant way to achieve this.) Alan -- http://mail.python.org/mailman/listinfo/python-list