Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^11: RFC: Simulating Ruby's "yield" and "blocks" in Perl (Python)

by MonkOfAnotherSect (Sexton)
on Apr 28, 2013 at 00:45 UTC ( #1031020=note: print w/replies, xml ) Need Help??


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"

  • Comment on Re^11: RFC: Simulating Ruby's "yield" and "blocks" in Perl (Python)

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
    > Python is finicky

    indeed!

    > -T. "We now return you to your regularly scheduled Perl"

    agreed! =)

    Cheers Rolf

    ( addicted to the Perl Programming Language)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1031020]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2023-02-03 20:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (29 votes). Check out past polls.

    Notices?