Cython API: fixed a bug when printing a column

This commit is contained in:
Celine Mercier
2017-07-28 10:01:56 +02:00
parent adf5cbef97
commit 01c69e7e25

View File

@ -197,7 +197,6 @@ cdef class Column(OBIWrapper) :
def __iter__(self): def __iter__(self):
cdef index_t line_nb cdef index_t line_nb
for line_nb in range(self.lines_used): for line_nb in range(self.lines_used):
yield self[line_nb] yield self[line_nb]
@ -211,8 +210,8 @@ cdef class Column(OBIWrapper) :
def __str__(self) : def __str__(self) :
cdef str to_print cdef str to_print
cdef Column_line line cdef object line
to_print = '' to_print = ''
for line in self : for line in self :
to_print = to_print + str(line) + "\n" to_print = to_print + str(line) + "\n"