def __str__(self): lines = '\n'.join(self.toString(getattr(self, val)) for val in self.lines if getattr(self, val)) one_line = tuple(self.toString(getattr(self, val), ' ') for val in self.one_line) lines += "\n%s, %s %s" % one_line if self.country: lines += '\n' + self.toString(self.country) return ascii(lines)
def __str__(self): lines = '\n'.join( self.toString(getattr(self, val)) for val in self.lines if getattr(self, val)) one_line = tuple( self.toString(getattr(self, val), ' ') for val in self.one_line) lines += "\n%s, %s %s" % one_line if self.country: lines += '\n' + self.toString(self.country) return ascii(lines)
def __str__(self): eng_order = ('prefix', 'given', 'additional', 'family', 'suffix') out = ' '.join(self.toString(getattr(self, val)) for val in eng_order) return ascii(out)