Am 20.07.2010 12:10, schrieb dmitrey:
> hi all,
> I have a class (FuncDesigner oofun) that has no attribute "size", but
> it is overloaded in __getattr__, so if someone invokes
> "myObject.size", it is generated (as another oofun) and connected to
> myObject as attribute.

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.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to