ViewPoint.name#

property ViewPoint.name: str | None#

Name of the vertex

Returns:

the name

Return type:

str or None

The name is the vertex’s key in its graph: g[name] and name in g look it up. A vertex that is not in a graph can be given any name, or none. For one that is in a graph:

  • assigning a new name updates the graph’s name table, so the vertex is then found under the new name and not the old

  • a name already used by another vertex in the graph raises ValueError and changes nothing

  • the name cannot be cleared

Changed in version 1.0: Renaming a vertex in a graph used to leave the graph’s name table stale, so lookups by the new name failed.

Seealso:

Graph.add_vertex