"Carl Banks" <[EMAIL PROTECTED]> writes:

> Michele Simionato wrote:
> > Carl Banks:
> > > If Python did it the way Scheme did, this would be pretty useless.
> >
> > But notice that Scheme has no problems whatsoever:
> >
> > (define (toplevel)
> >   (define a 1)
> >   (define (f)
> >     (display a))
> >   (set! a 2)
> >   (f))
> >
> > (toplevel)
> >
> > prints 2 the same as in Python.
> 
> Hmm. On closer inspection, I'm going to have to amend my implictation
> of Scheme: the example poster was cheating.  Scheme and Python both do
> closures the same way.  However, the Scheme snippet in the original
> example used a let-block.  I.e., it introduced a new scope, whereas the
> Python example did not (because it doesn't have anything like let).

Yes, we've been over this many times. I'm surprised that Michele
hasn't yet referenced the thread where we exposed the gory details, as
was his custom for a while :-)



Message-ID: <[EMAIL PROTECTED]>, for this particular
aspect, in case anyone gives a monkey's left testicle.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to