docarray.simple.list module

class docarray.simple.list.ListView(obj=None, copy=False)[source]

Bases: docarray.base.BaseProtoView, collections.abc.MutableSequence

Create a Python mutable sequence view of Protobuf ListValue struct.

This can be used in all Jina types where a protobuf.ListValue is returned.

Used inside StructView when the inner element is a ListValue

insert(index, object)[source]

Insert any value that can be converted into a struct_pb2.Value into the list

Parameters
  • index (int) – Position of the insertion.

  • object (Any) – The object that needs to be inserted.

Return type

None