It would be helpful if the fmeobjects API had better support for complex lists. Consider the list:
_list{0}.id = '502' _list{0}.text = 'abc' _list{1}.id = '36' _list{1}.text = 'xyz'The following fmeobjects method currently returns None:
items = feature.getAttribute('_list{}') To access child elements, you currently have to access them invidudually and then assemble them into an appropriate structure yourself.
It would be very handy if the getAttribute() method could return a nested Python dictionary containing the entire list with its elements, e.g. using the sample list above:
items = {0: {'id': '502', 'text': 'abc'}, 1: {'id': '36', 'text': 'xyz'}}This would get rid of a lot of boilerplate code in Python scripts dealing with FME lists, as we could access individual list items using syntax like:
>>> print items[1]['text'] 'xyz'


