Linebreaks and Indention

Martin Schulze joey at infodrom.org
Wed Mar 24 18:48:33 CET 2004


I noticed that python-mode *and* Python behave "a little bit" strange
to linebreaks.

If I try to break a longer line inside python-mode

  foo_bar_baz = bar 

auto-indention creates:

  foo_bar_baz = \
              bar

which only saves two characters width, which is rediculous.

Do you want the second line indented by 4 characters or zero
characters?  I.e.

  foo_bar_baz = \
      bar

or

  foo_bar_baz = \
  bar

The latter is created by python-mode/auto-indent if one splits the
line without inserting a backslash at once.  Surprisingly Python
will accept both.

Another question is how you prefer to break long lines with
function/method calls like

  foo_bar_baz(baz_bar

Emacs python-mode/auto-indent automatically indents properly if
split after an opening paranthesis:

  foo_bar_baz(
      baz_bar

but not if split before the parentheis:

  foo_bar_baz
  (baz_bar

Surprisingly Python will accept both.  But which one do you prefer?

Regards,

	Joey

-- 
Still can't talk about what I can't talk about.  Sorry.  -- Bruce Schneier

Please always Cc to me when replying to me on the lists.




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)