Skip to content

Commit

Permalink
Merge pull request #27 from dokato/const_update
Browse files Browse the repository at this point in the history
symbol argument added to Constant
  • Loading branch information
pgleeson committed Jun 9, 2016
2 parents ea00df5 + 32d1fc7 commit 668cc64
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lems/model/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class Constant(LEMSBase):
Stores a constant specification.
"""

def __init__(self, name, value, dimension = None, description = ''):
def __init__(self, name, value, dimension = None, symbol = None, description = ''):
"""
Constructor.
Expand All @@ -229,6 +229,10 @@ def __init__(self, name, value, dimension = None, description = ''):
self.name = name
""" Name of the constant.
@type: str """

self.symbol = symbol
""" Symbol of the constant.
@type: str """

self.value = value
""" Value of the constant.
Expand All @@ -253,6 +257,7 @@ def toxml(self):

return '<Constant' +\
(' name = "{0}"'.format(self.name) if self.name else '') +\
(' symbol = "{0}"'.format(self.symbol) if self.symbol else '') +\
(' value = "{0}"'.format(self.value) if self.value else '') +\
(' dimension = "{0}"'.format(self.dimension) if self.dimension else '') +\
(' description = "{0}"'.format(self.description) if self.description else '') +\
Expand Down

0 comments on commit 668cc64

Please sign in to comment.