Skip to content

Commit

Permalink
Merge pull request #79 from tv3141/consistent_string_representation
Browse files Browse the repository at this point in the history
Use self.symbol as consistent string representation
  • Loading branch information
djkirkham authored Nov 10, 2017
2 parents bd988a4 + 05d1764 commit b74f3be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cf_units/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1670,12 +1670,12 @@ def __str__(self):
For example:
>>> import cf_units
>>> u = cf_units.Unit('meters')
>>> u = cf_units.Unit('miles/hour')
>>> str(u)
'meters'
'miles/hour'
"""
return self.origin or self.name
return self.origin or self.symbol

def __repr__(self):
"""
Expand Down

0 comments on commit b74f3be

Please sign in to comment.