Python scoping

Steve Horne sh at ttsoftware.co.uk
Fri Oct 27 04:27:04 EDT 2000


On Fri, 27 Oct 2000 00:28:15 +0200, "Alex Martelli"
<aleaxit at yahoo.com> wrote:

>I recall that in PL/I you may, if you wish, recall the label in
>the END clause (or was it Ada...?  darn -- big languages, long
>ago...):

Ada certainly allows some types of blocks to be named, and allows you
to use those names (for instance) to exit out of multiple layers of
loop in one go (sound like a hidden goto?)

You must specify the block name for 'end' with procedures and
functions, but cannot (except comments) for ifs, loops etc.

Modula-2 and pascal, IIRC, do not allow named blocks.

C, C++ and Java certainly not.

I've never used PL/1.

-- 
Steve Horne
sh at ttsoftware.co.uk



More information about the Python-list mailing list