From dd97b10ff1f3d4f99f20325118325fe35a3a276a Mon Sep 17 00:00:00 2001 From: Gabriel Bustamante Date: Fri, 14 Jul 2023 18:40:24 -0500 Subject: [PATCH] FIX: misleading __repr__ for Species(None) and Species('*') (#479) --- pycalphad/variables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pycalphad/variables.py b/pycalphad/variables.py index e035c0c63..bce229785 100644 --- a/pycalphad/variables.py +++ b/pycalphad/variables.py @@ -93,9 +93,9 @@ def weight(self): def __repr__(self): if self.name == '*': - return '*' + return str(self.__class__.__name__)+'(\'*\')' if self.name == '': - return 'None' + return str(self.__class__.__name__)+"(None)" species_constituents = ''.join( ['{}{}'.format(el, val) for el, val in sorted(self.constituents.items(), key=lambda t: t[0])]) if self.charge == 0: