|
|
|
|
|
by perfunctory
2221 days ago
|
|
def _check_networkx_graph(self, graph):
try:
if not isinstance(graph, nx.classes.graph.Graph):
raise TypeError("This is not a NetworkX graph. Please see requirements.")
except:
exit("This is not a NetworkX graph. Please see requirements.")
First, I don't want any library to call exit on me. Second, what is it even trying to do? Raising an exception and immediately catching it? At best this is just a horrible style. |
|