diff --git a/python/obitools3/dms/view/typed_view/view_NUC_SEQS.pyx b/python/obitools3/dms/view/typed_view/view_NUC_SEQS.pyx index 693b43e..fe18a8c 100644 --- a/python/obitools3/dms/view/typed_view/view_NUC_SEQS.pyx +++ b/python/obitools3/dms/view/typed_view/view_NUC_SEQS.pyx @@ -57,12 +57,13 @@ cdef class View_NUC_SEQS(View): return view - + +# TODO def __getitem__(self, object item) : - if type(item) == str : - return self.get_column(item) # TODO hyper lent dans la pratique - elif type(item) == int : + if type(item) == int : return Nuc_Seq_Stored(self, item) + else : # TODO assume str or bytes for optimization? + return self.get_column(item) # TODO hyper lent dans la pratique def __setitem__(self, index_t line_idx, Nuc_Seq sequence_obj) : @@ -70,6 +71,8 @@ cdef class View_NUC_SEQS(View): self[line_idx][key] = sequence_obj[key] +# TODO make properties for id, seq, def columns etc + def register_class() : register_view_class(VIEW_TYPE_NUC_SEQS, View_NUC_SEQS)