kinbaku.Graph.__contains__

Graph.__contains__(item)[source]

Returns True if node or edge exists

Parameters

item (str or tuple) – if item is a string, return has_node(item), if item is a tuple, return has_edge(…)

Raises

KinbakuException – query malformed

Returns

True if edge or node exists, False otherwise

Return type

bool