Ian Bicking: the old part of his blog

Re: Closures

AFAIK, Python does not have lexical closures/scoping which function in the "usual" (e.g. lisp, javascript) or intuitive manner. Lexically closed variables are read-only. See http://groups.google.com/group/comp.lang.python/browse_frm/thread/cf66057c1f9a9141/ for examples and details. I can not speak about Ruby on this point, though I have been lead to believe that its closures are the "usual" kind.

Cheers!

Comment on Ruby, Python, "Power"
by Todd DeLuca

Comments:

Lexically closed variables are read-only.

Wrong. Lexically closed names are read-only. That's because Python doesn't distinguish between assignment and binding.

Ruby seems to do, though. I actually find this counter-intuitive, as both assignment and binding use the same syntax.

# Matthias Benkard

I'd like to thank you for this post.

I've been reading too many inane Python Vs. Ruby monologues lately from fan boys of both camps.

This was a well-written and interesting piece.

Hehe, kind of amusing that while posting this comment, I hit a Python error. I'd post the traceback, but that seems to exacerbate the errors.

# Marc

I'd like to thank you for this post.

I've been reading too many inane Python Vs. Ruby monologues lately from fan boys of both camps.

This was a well-written and interesting piece.

Hehe, kind of amusing that while posting this comment, I hit a Python error. I'd post the traceback, but that seems to exacerbate the errors.

# Marc

I'd like to thank you for this post.

I've been reading too many inane Python Vs. Ruby monologues lately from fan boys of both camps.

This was a well-written and interesting piece.

Hehe, kind of amusing that while posting this comment, I got a Python error.

# Marc