IngoingEndpoint#

class IngoingEndpoint(node, position, **attr)#

Bases: Endpoint

Oriented incoming endpoint.

Parameters:
  • node (Hashable)

  • position (int)

  • attr (dict[str, Any])

__init__(node, position, **attr)#

Construct an endpoint.

Parameters:
  • node (Hashable) – Node identifier.

  • position (int) – Position index at the node.

  • **attr (Any) – Arbitrary endpoint attributes.

Return type:

None

Methods

__init__(node, position, **attr)

Construct an endpoint.

get(key[, _Endpoint__default])

Return an attribute value with a default.

is_oriented()

Return whether the endpoint type is oriented.

reverse_type()

Return the opposite endpoint type.

Attributes

static reverse_type()#

Return the opposite endpoint type.

Returns:

type[OutgoingEndpoint] – The outgoing endpoint class.

Return type:

type[OutgoingEndpoint]

static is_oriented()#

Return whether the endpoint type is oriented.

Returns:

bool – Always True.

Return type:

bool

get(key, _Endpoint__default=None)#

Return an attribute value with a default.

Parameters:
  • key (str) – Attribute key.

  • __default – Default value if key is missing.

  • _Endpoint__default (Any)

Returns:

Any – Stored value or __default.

Return type:

Any

node: Hashable#
position: int#
attr: dict[str, Any]#