Alternate indent proposal for python 3000

Matthew Woodcraft mattheww at
Sun Apr 20 18:42:05 CEST 2008

Christian Heimes  <lists at> wrote:
>> I feel that including some optional means to block code would be a big
>> step in getting wider adoption of the language in web development and
>> in general.  I do understand though, that the current strict indenting
>> is part of the core of the language, so... thoughts?

> Why should Python repeat the mistakes other languages did with SSI or
> <?php ?> inline code? Python favors the MVC separation of code and layout.

An alternative scheme for describing the block structure could be
useful in other cases, though. For example, if you wanted to support
putting snippets of Python in configuration files, or spreadsheet

There's no need to support the new scheme in .py files, so it seems to
me that this doesn't have to be done in the core language. All that's
needed is a variant of 'eval' which expects the alternate scheme, and
that could be prototyped just using text manipulation and the normal

If someone wrote a library for this and it proved popular, I expect it
would be considered for the standard library.


More information about the Python-list mailing list