- Code: Select all
class Foo(object):
def foo(self,
arg1, arg2,
arg3,
arg4):
if self.method() \
.method2() \
.method3():
pass
Here's the same code entered in ST2. Note how in each line continuation, the second and following lines are indented at the same level as their parent lines and aren't visually distinguishable.
- Code: Select all
class Foo(object):
def foo(self,
arg1, arg2,
arg3,
arg4):
if self.method() \
.method2() \
.method3():
pass
Much more important than devotion to a style guide is that code following those continued lines - such as the "if self.method [...]" and "pass" lines in my example - should be indented to form new blocks, but ST2 doesn't indent them at all. The result is syntactically invalid Python.
I haven't worked up the bravery to investigate the syntax definitions myself. Is it possible to implement this idea in ST2 as it stands today?