[Twisted-Python] Coding standard question: flowing long imports with parens

Jonathan Lange jml at mumak.net
Mon Dec 21 00:03:07 EST 2009


This is a very unimportant question, and I have no stake in the
outcome beyond curiosity. It's bikeshed potential is high, and I'd
like to avoid that if possible.

The "Whitespace" section of the coding standard[1] says:

To handle long import lines, please repeat the import like this:

from very.long.package import foo, bar, baz
from very.long.package import qux, quux, quuux

Now that we no longer support Python 2.3, may we also allow imports in
the following style?

  from very.long.package import (

I don't care so much about the newlines, I'm mostly interested in
using parens to avoid repeating the long package names. That said,
newline separation and alpha-sorted imports greatly reduce the
probability of conflicts.


More information about the Twisted-Python mailing list