From abdeace107f8c68003b4ff71148d0d87cfd24009 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Wed, 15 Jun 2022 14:05:41 +0100 Subject: [PATCH] fix: Modification of parameter with default in Corr.__repr__ fixed. --- pyerrors/correlators.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyerrors/correlators.py b/pyerrors/correlators.py index 646ef875..ecb8d525 100644 --- a/pyerrors/correlators.py +++ b/pyerrors/correlators.py @@ -897,12 +897,14 @@ class Corr: else: raise Exception("Unknown datatype " + str(datatype)) - def print(self, print_range=[0, None]): + def print(self, print_range=None): print(self.__repr__(print_range)) - def __repr__(self, print_range=[0, None]): - content_string = "" + def __repr__(self, print_range=None): + if print_range is None: + print_range = [0, None] + content_string = "" content_string += "Corr T=" + str(self.T) + " N=" + str(self.N) + "\n" # +" filled with"+ str(type(self.content[0][0])) there should be a good solution here if self.tag is not None: