RE: [PyCrust] Attribute list hook
Brought to you by:
pobrien
From: Mark H. <Ma...@Ac...> - 2001-08-12 00:10:46
|
> If not, I propose a convention which is to provide a getAttributeNames > method on any class that wants to expose its dynamic (or semi-dynamic) > attributes to shells. Thus > > class D11: > def getAttributeNames(self): > return ["woderwick", "woger", "weginald"] I like the idea, but would prefer to see one or 2 leading "_" on the name. Considering a COM object, for example, the potential exists that "getAttributeNames" could be a real method on the object. A leading _ also helps reinforce this is not a method designed to be called by the "average" user of the object. Mark. |