Why whitespace denotation of blocks doesn't work.
Neil Hodgson
neilh at scintilla.org
Sat Jun 17 21:37:37 EDT 2000
> The point is not that I can copy and paste with out reindenting.
> The point is that sometimes I have to. let me show a generic example
>
> if a:
> for b in B:
> if c(b):
> block statement.
>
> Assume that you are editing another part and you realise that you
> are about to essentially retype the block statement. So you do
>
> def fun():
> block statement
>
> if a:
> for b in B:
> if c(b):
> fun()
> you have to reindent the block statement. This is not copy and paste
> reuse. It is cut and paste refactoring, and you have to reindent.
Your example does not /require/ any reindenting. It may look better
reindented but this is one case where refactoring does not have to lead to
reindenting.
Neil
More information about the Python-list
mailing list