Thoughts on PEP315

Stephen Horne $$$$$$$$$$$$$$$$$ at $$$$$$$$$$$$$$$$$$$$.co.uk
Thu Sep 25 21:47:26 CEST 2003


On Thu, 25 Sep 2003 13:36:40 +0000, Neil Padgen
<neil.padgen at mon.bbc.co.uk> wrote:

>>>>>> "Stephen" == Stephen Horne <$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$.co.uk> writes:
>
>    Stephen> So a 'break if ... :' cannot accidentally metamorphose
>    Stephen> into a 'break; if ... :'.
>
>It can if you press return at the wrong place:
>
>    while True:
>        blah ; blah ; blah
>    break
>    if condition:
>        blah ; blah ; blah
>
>This would be perfectly legal if the new-style while loop were in
>another loop.

I don't think this is a serious problem. It's hard to miss the fact
that the 'break' and the 'if' are on different lines.

You might just as well claim that...

  print "Hello World"

...is bad syntax because...

  print
  "Hello World"

...is legal but (particularly when not run from the command line)
different.


-- 
Steve Horne

steve at ninereeds dot fsnet dot co dot uk




More information about the Python-list mailing list