def setAttrib(self, a, v, inherit=False): '''set attributes key a to v, with cast to python datatypes''' NmpmlObject.setAttrib(self, a, v, inherit) if a in ["Origin", "Edge"]: d=self.getElements("Data") d[0].setAttrib(a, v)