From: Chad Perrin Date: 2006-07-27T09:03:30+09:00 Subject: Re: For performance, write it in C On Thu, Jul 27, 2006 at 08:53:18AM +0900, Keith Gaughan wrote: > On Thu, Jul 27, 2006 at 08:33:31AM +0900, Chad Perrin wrote: > > > > Is it just me, or are there no proper closures in that example code? > > No, Chad. There's closures in there. What you're not seeing is > anonymous functions, but closures are not the same as anonymous > functions. Maybe I'm missing something critical about Python, but I don't see the persistent code construct being passed from the function when its lexical scope (assuming it's truly lexical, which it might not be in this case) closes. It's only a closure if there's something persistent that was "closed" by the scope closing. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] "The first rule of magic is simple. Don't waste your time waving your hands and hopping when a rock or a club will do." - McCloctnick the Lucid