Alternate indent proposal for python 3000

Arnaud Delobelle arnodel at googlemail.com
Sun Apr 20 13:04:01 EDT 2008


On Apr 20, 5:42 pm, Matthew Woodcraft
<matth... at chiark.greenend.org.uk> wrote:
> Christian Heimes  <li... at cheimes.de> 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
> cells.
>
> 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
> 'eval'.

By 'eval', I guess you mean 'exec' :)

--
Arnaud




More information about the Python-list mailing list