def setSyntax(self, syntax):
        """Choose smart indentation algorithm according to syntax"""
        self._smartIndenter = self._chooseSmartIndenter(syntax)
def __iter__(self):
        for element in self._collection:
            yield self._to_python(element)