From e374b76f40b177c56b6bb87aa9686f5cf9317df6 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 5 Oct 2016 15:12:37 -0500 Subject: [PATCH] Improve printing of instructions with id=None --- loopy/kernel/data.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/loopy/kernel/data.py b/loopy/kernel/data.py index 5af3f0272..cfbff7a30 100644 --- a/loopy/kernel/data.py +++ b/loopy/kernel/data.py @@ -1256,8 +1256,10 @@ class Assignment(MultiAssignmentBase): # }}} def __str__(self): - result = "%s: %s <- %s" % (self.id, - self.assignee, self.expression) + result = "%s <- %s" % (self.assignee, self.expression) + + if self.id is not None: + result = "%s: " % self.id + result options = self.get_str_options() if options: -- GitLab