python - Name 'variable_name' used both as a parameter and as a global. How to fix? -


the code working is

build_data = {}  # code adds data build_data  build_data_filtered = {} if flag:      # code adds subset of build_data build_data_filtered      global build_data     build_data = build_data_filtered 

the line "global build_data" shows code hint in pycharm

name 'build_data' used both parameter , global 

what can remove hint or there better approach this?

why using global statement outside of function?

just remove line global build_data , should work.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -