Colons, indentation and reformatting. (2)

Jorgen Grahn grahn+nntp at snipabacken.dyndns.org
Tue Jan 9 06:57:57 EST 2007


On 8 Jan 2007 23:57:29 -0800, Paddy <paddy3118 at netscape.net> wrote:
>
> OK, whilst colons are not sufficient to re-format a completely
> mis-indented file. I'm thinking that they are sufficient for
> reformatting most pasted code blocks when refactoring say?

Let's put it this way: if the formatter can assume the original code is
valid (i.e. has the intended indentation) then it can do all kinds of nifty
things to it.

Personally, I'm happy with what Emacs' python-mode offers: suggested indents
as I type, and a command to indent/de-dent the highlighted block one step.

/Jorgen

-- 
  // Jorgen Grahn <grahn@        Ph'nglui mglw'nafh Cthulhu
\X/     snipabacken.dyndns.org>  R'lyeh wgah'nagl fhtagn!



More information about the Python-list mailing list