Python scoping

Steve Holden sholden at holdenweb.com
Sat Oct 28 17:30:04 EDT 2000


Alex Martelli wrote:
> 
> "Hartmann Schaffer" <hs at paradise.nirvananet> wrote in message
> news:8tda45$626$1 at paradise.nirvananet...
> > In article <gqeivsspqj64idsf6rr6dgbekif5t9osfo at 4ax.com>,
> > Steve Horne  <sh at ttsoftware.co.uk> wrote:
> > >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...):
> >
> > couldn't that be used for 'multiple closure' (i.e. it also close all
> > blocks that started within foo that weren't terminated yet)>
> 
> Could be, if you wanted to design a language that way, but
> that seems error-prone, while the optional redundancy of
> specifying what it is that you think are closing helps to have
> fewer error (perhaps) and better diagnostics of block
> closing errors (certainly).
> 
> Alex

The PL/1 F-level compiler did indeed allow multiple closures in the
way suggested.  A fruitful source of bugs.

regards
 Steve
-- 
Helping people meet their information needs with training and technology.
703 967 0887      sholden at bellatlantic.net      http://www.holdenweb.com/





More information about the Python-list mailing list