class neuroglancer.json_wrappers.List[T]

List of values of type T.

Type Parameters:
T

Element type.

Public members

List(json_data=None, _readonly=False)

Initialize self. See help(type(self)) for accurate signature.

__len__() -> int

Returns the length of the list.

__getitem__(key: int) -> T

Returns the element at the specified index.

__delitem__(key: int)

Removes the element at the specified index.

__setitem__(key: int, value: T)
__setitem__(key: slice, value: Iterable[T])

Assigns to the specified index or slice.

__iter__() -> Iterator[T]

Iterates over the values in the list.

append(value: T)

Appends a value to the end of the list.

extend(values: Iterable[T])

Extends the list with the specified values.

insert(index: int, value: T)

Inserts the specified value at the specified index.

pop(index: int = -1) -> T

Removes and returns the element at the specified index.

to_json()

Returns the representation as a JSON array.

__repr__()

Return repr(self).