On Fri, May 09, 2014 at 02:44:02AM -0500, William Giokas wrote: > Maybe a time to use something like:: > > from mercurial import foo \ > bar \ > baz \ > ... > > Would make that import into quite a few lines, but would help organize > things and let you easily organize things in the future.
From PEP 8 : 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 I prefer something like: from mercurial import ( bar, baz, foo, ) The indentation for the closing parenthesis is optional . You can of course do things like: from mercurial import ( bar, baz, foo, ) but I prefer the complete specification of “single, alphebetized entry per line”. I'm happy to send patches if that style is ok. Cheers, Trevor : http://legacy.python.org/dev/peps/pep-0008/#maximum-line-length : http://legacy.python.org/dev/peps/pep-0008/#indentation -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
Description: OpenPGP digital signature