High Order Messages in Python
bonono at gmail.com
bonono at gmail.com
Sun Oct 23 22:54:36 EDT 2005
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.
More information about the Python-list
mailing list