From e611fa1e439f6bd0c35fd8db2ca1ced56070a915 Mon Sep 17 00:00:00 2001 From: Dan Schult Date: Fri, 15 Oct 2021 15:01:14 -0400 Subject: Change exception varname e to err (#5130) A more descriptive variable name for exceptions. This reduces local var naming conflicts when \`e\` is used e.g. to represent edges as a loop variable. --- examples/subclass/plot_antigraph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/subclass/plot_antigraph.py b/examples/subclass/plot_antigraph.py index ec6a97c4..154a321b 100644 --- a/examples/subclass/plot_antigraph.py +++ b/examples/subclass/plot_antigraph.py @@ -65,8 +65,8 @@ class AntiGraph(Graph): """ try: return iter(set(self.adj) - set(self.adj[n]) - {n}) - except KeyError as e: - raise nx.NetworkXError(f"The node {n} is not in the graph.") from e + except KeyError as err: + raise nx.NetworkXError(f"The node {n} is not in the graph.") from err def degree(self, nbunch=None, weight=None): """Return an iterator for (node, degree) in the dense graph. -- cgit v1.2.1