diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2020-03-18 16:45:11 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2020-03-18 16:52:48 +0000 |
commit | 6846925b31c752b97d7de0b2a76308e22b6264d5 (patch) | |
tree | 056a3f1826b21ae340a3d6d08fc91c2dcdd8a682 /numpy/f2py/cb_rules.py | |
parent | 20f22d849002d80485787adeb8a7340dab159f94 (diff) | |
download | numpy-6846925b31c752b97d7de0b2a76308e22b6264d5.tar.gz |
MAINT: remove useless `global` statements
`global` is only needed if a variable appears on the left of an assignment.
These variables do not.
Most suffer from the misconception that `var[x] = y` requires `var` to be global, but it does not.
Diffstat (limited to 'numpy/f2py/cb_rules.py')
-rw-r--r-- | numpy/f2py/cb_rules.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/numpy/f2py/cb_rules.py b/numpy/f2py/cb_rules.py index 54e49f68e..87887c152 100644 --- a/numpy/f2py/cb_rules.py +++ b/numpy/f2py/cb_rules.py @@ -436,7 +436,6 @@ cb_map = {} def buildcallbacks(m): - global cb_map cb_map[m['name']] = [] for bi in m['body']: if bi['block'] == 'interface': @@ -448,7 +447,6 @@ def buildcallbacks(m): def buildcallback(rout, um): - global cb_map from . import capi_maps outmess('\tConstructing call-back function "cb_%s_in_%s"\n' % |