Skip to content

Commit

Permalink
FIX: misleading __repr__ for Species(None) and Species('*') (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielBusta committed Jul 14, 2023
1 parent 672efc2 commit dd97b10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pycalphad/variables.py
Expand Up @@ -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:
Expand Down

0 comments on commit dd97b10

Please sign in to comment.