in reply to Re^5: RFC: Simulating Ruby's "yield" and "blocks" in Perl (Python)
in thread RFC: Simulating Ruby's "yield" and "blocks" in Perl
> I don't really see a win with this style, though, over giving test a parameter, and just using standard function calls (I had a little play with coroutines on the way but that's really overkill for this).
Well I expected decorators to be more flexible, i.e. to redefine test() by putting a wrapper around it and not to built a new decorator @test (!?!)
But I'm not too proficient with Python, and I'm misunderstanding the code.
(well, there must be a reason why I prefer Perl's syntactic flexibility. ;-)
I suppose def _(a) is a way to workaround the limitations of lamda?
Is the name _ special (magic) or is it just a convention?
Cheers Rolf
( addicted to the Perl Programming Language)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: RFC: Simulating Ruby's "yield" and "blocks" in Perl (Python)
by MonkOfAnotherSect (Sexton) on Apr 26, 2013 at 15:13 UTC | |
by LanX (Saint) on Apr 26, 2013 at 17:54 UTC | |
by MonkOfAnotherSect (Sexton) on Apr 27, 2013 at 14:11 UTC | |
by LanX (Saint) on Apr 27, 2013 at 15:07 UTC | |
by MonkOfAnotherSect (Sexton) on Apr 28, 2013 at 00:45 UTC | |
|
In Section
Meditations