d3m.container.list¶
-
class
d3m.container.list.
List
(iterable=(), metadata=None, *, generate_metadata=False, check=True, source=None, timestamp=None)[source]¶ Bases:
list
Extended Python standard list with the
metadata
attribute.You should use only standard data and container types as its elements.
Metadata attribute is immutable, so if you
update
it, you should reassign it back:l.metadata = l.metadata.update(...)
List is mutable, but this can introduce issues during runtime if a primitive modifies its inputs directly. Callers of primitives are encouraged to make it immutable to assure such behavior is detected/prevented, and primitives should copy inputs to a mutable List before modifying it.
- Parameters
iterable (
Iterable
) – Optional initial values for the list.metadata (d3m.metadata.base.DataMetadata) – Optional initial metadata for the top-level of the list, or top-level metadata to be updated if
iterable
is another instance of this list class.generate_metadata (
bool
) – Automatically generate and update the metadata.check (
bool
) – DEPRECATED: argument ignored.timestamp (
Optional
[datetime
]) – DEPRECATED: argument ignored.
-
metadata
: d3m.metadata.base.DataMetadata[source]¶ Metadata associated with the list.