25 Oct
2000
25 Oct
'00
9:05 a.m.
Anyone know what those attributes are?
Heres a good trick: add this method to your class to see which attributes it is asked for, but doesnt implement. def __getattr__(self,id,reg={}): if not reg.has_key(id): print `id` reg[id]=id raise AttributeError(id)
But these are very specific classes that exist for no longer than the duration of serving a single page request, and it'd just be nice to know that they're not going to acquire and fluff they shouldn't...
An alternative approach: apply tighter security to the method that constructs these objects, and leave the objects themselves completely open.