In article <[EMAIL PROTECTED]>, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > >It is always good practice to provide default values for instance >variables in the class definition, both to enhance readability and to >allow adding documentation regarding the variables, e.g.
Actually, my company uses an occasional pattern of detecting whether an attribute has ever been set with hasattr(). I am not particularly fond of that mechanism because it has been the occasional source of subtle bugs, but I also see the utility. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "It is easier to optimize correct code than to correct optimized code." --Bill Harlan -- http://mail.python.org/mailman/listinfo/python-list