diff options
author | Dan Schult <dschult@colgate.edu> | 2021-10-15 15:01:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 12:01:14 -0700 |
commit | e611fa1e439f6bd0c35fd8db2ca1ced56070a915 (patch) | |
tree | c9802d9fccebd5fe5909634f9daf5ef515b6dc6e /examples | |
parent | ba48935f4c1bcec19f93090a81409fde823561e4 (diff) | |
download | networkx-e611fa1e439f6bd0c35fd8db2ca1ced56070a915.tar.gz |
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.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/subclass/plot_antigraph.py | 4 |
1 files changed, 2 insertions, 2 deletions
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. |