Basically, I think the import statement ought to accept parenthesis, just as “from blah import (a,b,c)” does.
Ie this code, which is currently a syntax error:
import (os, sys, ...
importlib)
ought to be accepted and be equivalent to
import os, sys, ..., importlib
Currently, the workaround is to simply break this up into separate import statements, but I don’t see any benefit to forcing that split and the inconsistency with “from blah import (a,b,c)” is awkward and surprising imo. (I’ve been using python since ~2.6 and forgot that this wasn’t allowed.)
This came up tangentially last year in another thread, Parentheses in global statement , but there the discussion was more about the global/nonlocal statements and got into debates about functional need there, with not much debate centered around this proposal. Here, I’m specifically and exclusively advocating for parenthesis for the simple import statement.
I’ve searched my old emails and have searched in discourse and don’t see any discussions specifically about this topic, but if anyone is aware of any, please let me know.
Thanks