http://www.python.org/dev/peps/pep-0008/#maximum-line-length
The Python standard library is conservative and requires limiting
lines to 79 characters (and docstrings/comments to 72).
The preferred way of wrapping long lines is by using Python's implied
line continuation inside parentheses, brackets and braces. Long lines
can be broken over multiple lines by wrapping expressions in
parentheses. These should be used in preference to using a backslash
for line continuation.
So in your case this could be:
from blqblq.lqlqlqlq.bla import (
fobarbazbarbarbazar
as foo)
from matplotlib.backends.backend_qt4agg import (
FigureCanvasQTAgg
as FigureCanvas)
Personally I always use this style which I find more readable with long lines:
# Just 1 indent
from blqblq.lqlqlqlq.bla import (
fobarbazbarbarbazar
as foo
) # end at the next line so it's always clear where what ends
from matplotlib.backends.backend_qt4agg import (
FigureCanvasQTAgg as FigureCanvas
)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…