From 0f4f1c568faaf3fc88092ec5873ec91fd0bda539 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Mon, 29 Aug 2011 16:49:54 +0200 Subject: [PATCH] Include platform in stringification of device. --- pyopencl/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index c505cf71..1563fc8a 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -86,7 +86,8 @@ def _add_functionality(): # {{{ Device def device_repr(self): - return "<pyopencl.Device '%s' at 0x%x>" % (self.name, self.obj_ptr) + return "<pyopencl.Device '%s' on '%s' at 0x%x>" % ( + self.name.strip(), self.platform.name.strip(), self.obj_ptr) Device.__repr__ = device_repr -- GitLab