From 140e3261efde97a3ad18466259f1ed2d7b8fef62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 29 Jul 2016 11:28:16 +0200 Subject: [PATCH] make str more pytonic --- pytaxonomies/api.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pytaxonomies/api.py b/pytaxonomies/api.py index 19d100a..a045a7e 100644 --- a/pytaxonomies/api.py +++ b/pytaxonomies/api.py @@ -162,10 +162,8 @@ class Taxonomies(collections.Mapping): def __str__(self): to_print = '' - for mt_taxonomy in self.all_machinetags(): - for mt in mt_taxonomy: - to_print += '{}\n'.format(mt) - to_print += '\n' + for taxonomy in self.taxonomies.values(): + to_print += "{}\n\n".format(str(taxonomy)) return to_print def search(self, query, expanded=False):