diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index c505cf71b84a89d70e4533f6db7af77e23890aa7..1563fc8a5e84e6d7195f6961dbea81fe3cc7c83f 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