Cython API: Added an __iter__ method to the class Column_line (iterating

on the elements names) (previously an iteration would work but with
unexpected results)
This commit is contained in:
Celine Mercier
2017-07-07 15:41:10 +02:00
parent a718081ebd
commit 143bddf1d1

View File

@ -325,6 +325,14 @@ cdef class Column_line :
return str(self._column.get_line(self._index))
def __iter__(self) :
cdef list elements_names
cdef bytes element_name
elements_names = self._column.elements_names
for element_name in elements_names :
yield element_name
cpdef update(self, data): # TODO ?????
if isinstance(data, dict):
data=data.items()