snap-python
snap-python copied to clipboard
Semantics of Nodes() vs GetNodes()
Nodes() currently returns a generator function that iterates across all the nodes in a graph, while GetNodes() returns the number of nodes in the graph. The latter is easily confused with the former, especially when one is just starting out with Snap.py. I would like to propose renaming the latter function to NumNodes().
The same issue exists with Edges() and GetEdges()
GetNodes() is used in many places, so changing its name is not possible for compatibility reasons.