The Dot.Edge class

class Dot.Edge

Instances of this nested class represents an edge in the represented graph.

Edge objects can only be constructed by calling Dot.add_edge.

add_attr(self: Dot.Edge, key: str, val: str) Dot.Edge

Add an attribute to an edge.

This function adds a new attribute, or replaces the value of an existing attribute of an Edge.

Parameters:
  • key (str) – the name of the attribute.

  • val (str) – the value of the attribute.

Returns:

self

Return type:

Dot.Edge

property attrs

Read-only dictionary containing containing the attributes of the Edge.

property head

The name (read-only str) of the head of the edge.

property tail

The name (read-only str) of the tail of the edge.