could someone enlighten me what is the advantage of block over named function ?
One thing that I can see a difference may be lexical scope ? vdrab wrote: > On a (somewhat) related note, > I've always wondered whether it is possible to emulate ruby blocks > using a python generator '+ alpha'. In my limited understanding of the > ruby block, the generator can inject values into a block, I suppose, > but what is the block itself? can it be a function? a class instance? > what would it look like? I am sure someone must have played around with > this. > any pointers? > cheers, > v. -- http://mail.python.org/mailman/listinfo/python-list