From 38358b20857bb048ad6ba2fce514df3319a2f349 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 19 Mar 2013 11:36:44 -0700 Subject: [PATCH] Task: implement __repr__ --- pym/_emerge/Task.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/Task.py b/pym/_emerge/Task.py index 40f5066c0..769884bcf 100644 --- a/pym/_emerge/Task.py +++ b/pym/_emerge/Task.py @@ -1,4 +1,4 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage.util.SlotObject import SlotObject @@ -41,3 +41,7 @@ class Task(SlotObject): strings. """ return "(%s)" % ", ".join(("'%s'" % x for x in self._hash_key)) + + def __repr__(self): + return "<%s (%s)>" % (self.__class__.__name__, + ", ".join(("'%s'" % x for x in self._hash_key))) -- 2.26.2