> e.g. one that just looks in the object's dictionary so as to avoid returning 
> true for properties or other such fancy attributes.

So can anyone explain me how to look into object's dict? As I have
wrote, "something in dir(...)" requires O(numOfFields) while I would
like to use o(log(n))

>How about using a property instead of the __getattr__() hook? A property is a 
>computed attribute that (among other things) plays much nicer with hasattr.

Could anyone provide an example of it to be implemented, taking into
account that a user can manually set "myObject.size" to an integer
value?
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to