if a == 1:
if b == 2:
print 'x'
endif
print 5
The way I understood the original suggestion (which may not be exactly
what George Reynolds proposed) is that this is illegal, as the (bare)
":" states you're going to use indentation. If you don't want to use
indentation you would have to say:
if a == 1 do
if b == 2 do
print 'x'
endif
endif
print 5
Or, using the grammar modification Don Beaudry implemented, you could
write this:
if a == 1: :(
if b == 2: :(
print 'x'
:)
:)
print 5
Note that I'm pretty sure that Don's change even made sense out of
mixed-model code such as:
if a == 1: :(
if b == 2:
print 'x'
print 'y'
:)
print 5
Not that I recommend this as a style (although it would be a great
help for the obfuscated Python competition), just pointing out it
doesn't appear to be that hard to add optional delimiters that have
reasonable semantics.
Chris
-----------------------------------------------------------------------------
Chris Hoffmann VI Corporation
choffman@vicorp.com 47 Pleasant St. Northampton MA 01060