if not atom.blocks and caching_iter(p for r, c in resolver.livefs_dbs.iteritems() for p in resolver.get_db_match(r, c, atom)): vs. if not atom.blocks and caching_iter(p for r, c in resolver.livefs_dbs.iteritems() for p in resolver.get_db_match(r, c, atom)): either: if not atom.blocks and caching_iter( p for r, c in resolver.livefs_dbs.iteritems() for p in resolver.get_db_match(r, c, atom)): or something like: if not atom.blocks and caching_iter(p for r, c in resolver.livefs_dbs.iteritems() for p in resolver.get_db_match(r, c, atom)): (but that probably doesn't fit...) is what emacs does (if you break the line right after a paren or the like the new line gets as many extra tabstops as there are open parens, if you break the line at some other point the args get aligned after the current paren)