Python scoping

Michael Ackerman ack at simplyweb.net
Fri Oct 27 17:36:06 EDT 2000


"Steven D. Majewski" wrote:
> 
> On Thu, 26 Oct 2000, Michael Ackerman wrote:
> 
> > "Steven D. Majewski" wrote:
> > >
> > > On Tue, 24 Oct 2000, Joshua Muskovitz wrote:
> > >
> > .
> > >  A situation where the human eye uses indentation and the compiler
> > > uses braces is unsafe.
> >
> > Why is it unsafe? Doesn't it work well in Haskell?
> >
> 
> Doesn't Haskell use the "offside rule" like Python, and make
> the compiler follow the same rules as the human eye ?
 
Yes Haskell uses _an_ offside rule. The Haskell Report says: "The effect
of a Haskell program may depend on its _layout_. The effect of layout on
its meaning can be completely described by adding braces and semicolons
in places determined by the layout. The meaning of this augmented
program is now layout insensitive".
Were you claiming that this could not be done in a safe way?
                       -- Michael





More information about the Python-list mailing list