Scala considering significant indentation like Python

Skip Montanaro skip.montanaro at gmail.com
Mon May 22 10:24:40 EDT 2017


On Mon, May 22, 2017 at 9:14 AM, bartc <bc at freeuk.com> wrote:
> I think 'end' can be used in Python too:
>
>  if (cond):
>      stmts
>  end
>
> But:
>
> - You need to define a dummy variable 'end'

Interesting idea. You can avoid the dummy variable part by just using
'#end', however:

if cond:
    stmts
#end

Skip



More information about the Python-list mailing list