On Oct 3, 4:20 am, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Sat, Oct 2, 2010 at 8:01 PM, Carl Meyer <carl.j.me...@gmail.com> wrote: > >> We could even wrap the "no args to __init__" error check in a method > >> that enables it to be overridden and silenced in a subclass; that way, > >> introducing the potentially un-threadsafe behavior would need to be an > > > 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 don't. You've got me -- in my haste to propose an idea, I hadn't > considered assigning state in the constructor.
FWIW with the proposal of overriding __setattr__ to do setattr(self.request.state, attr, value) you can check that; at __init__ there is no self.request yet. George -- 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.