From f9fa27dacceb45b9cd1b00fd14f72ea05d9ea1f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 19 May 2017 18:42:03 +0200 Subject: [PATCH] property: add property.__str__ --- qubes/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qubes/__init__.py b/qubes/__init__.py index 41e059e9..7f933770 100644 --- a/qubes/__init__.py +++ b/qubes/__init__.py @@ -294,8 +294,10 @@ class property(object): # pylint: disable=redefined-builtin,invalid-name if self._default is not self._NO_DEFAULT \ else '' return '<{} object at {:#x} name={!r}{}>'.format( - self.__class__.__name__, id(self), self.__name__, default) \ + self.__class__.__name__, id(self), self.__name__, default) + def __str__(self): + return self.__name__ def __hash__(self): return hash(self.__name__)