Re: Nested For and While Statements

2007-09-25 Thread metawilm
On Sep 25, 7:07 pm, Zentrader <[EMAIL PROTECTED]> wrote: > Note that in list comprehension, [x for x in (1, 2, 3)], the > for loop allocates memory the same way, but the scope changes so that > "x" is visible outside the for loop, How is this different? The variable spilling of list comprehension

Re: Nested For and While Statements

2007-09-24 Thread metawilm
On Sep 24, 10:10 pm, Zentrader <[EMAIL PROTECTED]> wrote: > > Your for loops both use the same counting index. > > Since those variables are local to the for loop, No, "for" loops don't introduce a scope. The one variable named "j" is shared. > for j in range( 10 ): > print j, "first loop" >

Re: CLPython (was Re: merits of Lisp vs Python)

2006-12-16 Thread metawilm
Paul Rubin wrote: > [EMAIL PROTECTED] writes: > > > a = 'hello' > > > a[0] = 'H' # attempt to change first letter to upper case > > > > As CLPython mirrors Python semantics, this results in a TypeError. The > > internal representation of an immutable Python string is a mutable Lisp > > string

Re: CLPython (was Re: merits of Lisp vs Python)

2006-12-15 Thread metawilm
Paul Rubin wrote: > I thought it was of some interest though I'm a little surprise by the > choice of CL rather than Scheme as a target. In many aspects Python is a subset of CL. In CLPython, exceptions are Lisp conditions with a custom metaclass (strictly spoken not portable CL), Python (meta)cla