* Josh Powers <josh.pow...@canonical.com>, 2017-04-06, 14:30:
I have code similar to [1] where instead of directly assigning a dictionary
global variable the dictionary method update is used. Right now this results
in a W0602 global-variable-not-assigned.
Is this expected behavior and if so is there a better way to write the above?
Yes. The global statement only affects variable assignments. If you don't
assign to the variable, the global statement doesn't do anything and can be
removed.
--
Jakub Wilk
_______________________________________________
code-quality mailing list
code-quality@python.org
https://mail.python.org/mailman/listinfo/code-quality