Alternate indent proposal for python 3000

Matthew Woodcraft mattheww at chiark.greenend.org.uk
Sun Apr 20 20:22:07 CEST 2008


Terry Reedy <tjreedy at udel.edu> wrote:

> But you do not really need a variant.  Just define a preprocessor
> function 'blockify' which converts code in an alternate syntax to
> regular indented block syntax.  Then
>
> exec(blockify(alt_code_string))

You can do it like that, but if it were to become part of the standard
distribution it would be nice to avoid having to tokenise the code
twice. (You could define the new block scheme in such a way that
'blockify' doesn't need to tokenise, but I think it would end up a bit
ugly.)

-M-
 



More information about the Python-list mailing list