Global lists are identified as constants even though their contents are modified (using the append() method) inside global functions.

To try and sidestep this issue I used a "global" declaration of the list inside the functions to try and help pylint recognize their non constant nature. Pylint then complained that there were "global" declarations without any assignments being done.

I imagine that similar problems exist for other list methods that alter the list contents (e.g. extend(), sort(), reverse(), pop()) and are a clear indicator that the list is not a constant.

Peter
_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to