jacek.generowicz at cern.ch
Wed Mar 16 14:30:44 CET 2005
"Carl Banks" <invalidemail at aerojockey.com> 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: <tyf65dpaqae.fsf at pcepsft001.cern.ch>, for this particular
aspect, in case anyone gives a monkey's left testicle.
More information about the Python-list