I don\'t remember whether I was dreaming or not but I seem to recall there being a function which allowed something like,
foo in iter_attr(array of python ob
Are you looking to get a list of objects that have a certain attribute? If so, a list comprehension is the right way to do this.
result = [obj for obj in listOfObjs if hasattr(obj, 'attributeName')]