Python style: should I avoid commenting my import statements?
Question: I'll try to make this as closed-ended of a question as possible:

I often find that I have a group of imports that go together, like a bunch of
mathy imports; but later on I might delete or move the section of code which
uses those imported items to another file. The problem is that I often forget
why I was using a particular import (for example, I use the Counter class very
often, or random stuff from itertools.) For this reason I might like to have
comments that specify what my imports are for; that way if I no longer need
them, I can just delete the whole chunk.

Is it considered bad style to have comments in with my import statements?


Answer: Well, the beautiful thing about python is that it is (or should be) explicit.
In this case, so long as you're not doing * imports, (which is considered bad
practice), you'll KNOW whether an import is referenced simply by doing a grep
for the namespace. And then you'll know whether you can delete it.

Allow me to also add a counterpoint to the other answers. 'Too much'
commenting can _indeed_ be bad practice. You shouldn't be adding redundant
comments to code which is patently obvious as to its function. Additionally,
comments, just like code, must be maintained. If you're creating excessive
comments, you're creating a ton more work for yourself.

