On 07-09-18 22:08, Michael F. Stemper wrote:
>> id = xmlmodel.attrib['name']
>> except KeyError:
>> id = "constant power"
> Never mind! After I continued testing, I realized that the above
> should have been written as:
> if 'name' in xmlmodel.attrib:
> id = xmlmodel.attrib['name']
> id = "constant power"
id = xmlmodel.attrib.get('name', "constant power")