def yieldattr(self, attr):


        """
         Takes as argument a dictionary which keys are the names of a node's
         attributes,each one bound with their value.It processes the dict's items,
         returning a string from the resulting list of just-unpacked tuples.

        """
        t = attr.items()
        t2 = []
        for item in t[:]:
            t2.append(' %s = "%s" ' %(item[0],item[1]))
            if not item:
                break
                try :
                    return ''
                except :
                    pass
            else :
                continue
        return str(t2).lstrip("['").rstrip("']").replace("'","").replace(",","")

         Takes as argument a dictionary which keys are the names of a node's
         attributes,each one bound with their value.It processes the dict's items,
         returning a string from the resulting list of just-unpacked tuples.

        
recipes/Python/498101_Simpliest_XML_generator/recipe-498101.py