On Oct 2, 1:01 pm, Carl Meyer <carl.j.me...@gmail.com> wrote: > Again, arguments to __init__ are not the issue. What would have to be > checked is any assignment to self that takes place in __init__. How do > you propose to check that? >
I think __slots__ would do for this: it would prevent a user of a view instance from just randomly assigning to self.X, unless X were named in __slots__. Likewise, __setattr__ can be used to check for assignments to self. Of course, both might be capable of being subverted, but could be helpful in catching inadvertent mistakes. Regards, Vinay Sajip -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.