in reply to Re^10: RFC: Simulating Ruby's "yield" and "blocks" in Perl (Python)
in thread RFC: Simulating Ruby's "yield" and "blocks" in Perl
Ah, you're using an old version where print was still a statement not a function; Python is finicky about how statements are used. v2.6-v2.7 allows "from __future__ import print_function", and in v3.0+ it is a function. If you really must use a lambda in v2.5- then "import sys" and use "sys.stdout.write()"... no you mustn't.
-T. "We now return you to your regularly scheduled Perl"
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^12: RFC: Simulating Ruby's "yield" and "blocks" in Perl (Python)
by LanX (Sage) on Apr 28, 2013 at 13:10 UTC |
In Section
Meditations