High Order Messages in Python
gene tani
gene.tani at gmail.com
Sun Oct 23 22:12:44 EDT 2005
http://www.artima.com/intv/closures.html
http://www.rubyist.net/~matz/slides/oscon2005/index.html
It's a read-write closure, a co-routine, sort of a continuation (tho
Kernel.callcc is considered the real continuation mechanism).
And you can make it a Proc object (basically an unbound object you can
pass to methods) with Proc#new or lambda. HTH
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