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
Post a Comment