This documents the development version of NetworkX. Documentation for the current release can be found here.
Returns an iterator over nodes contained in nbunch that are also in the graph.
The nodes in nbunch are checked for membership in the graph and if not are silently ignored.
- nbunchsingle node, container, or all nodes (default= all nodes)
The view will only report edges incident to these nodes.
An iterator over nodes in nbunch that are also in the graph. If nbunch is None, iterate over all nodes in the graph.
If nbunch is not a node or sequence of nodes. If a node in nbunch is not hashable.
When nbunch is an iterator, the returned iterator yields values directly from nbunch, becoming exhausted when nbunch is exhausted.
To test whether nbunch is a single node, one can use “if nbunch in self:”, even after processing with this routine.