getattr

static OperationNamespace.getattr(value, attr, *, name=None)

Gets an attribute from a node value.

Parameters
  • value (Any) – The value from which to get the item.

  • attr (int or slice or List[int or slice]) – The attribute for the item or items.

  • name (str, optional) – The name of the node.

Returns

The item or items obtained from value.attr, or to be more precise, getattr(value, attr).

Return type

Any