def from_xml(t): from lighthouse.types import type_from_xml d = Decl() if t.get('location'): d.location = Location(t.get('location')) d.binding = Binding.from_xml(t.find('binding')) d.type = type_from_xml(t.find('type').getchildren()[0]) return d
def __init__(self, type, value): self.type = types.type_from_xml(type) if value.get('special'): self.value = decimal.Decimal(value.get('special')) else: self.value = decimal.Decimal(value.get('value'))
def __init__(self, type, value): self.type = types.type_from_xml(type) self.value = long(value.get('value'))