Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by LanX (Sage)
on Apr 26, 2013 at 17:54 UTC ( #1030873=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     test(def _(x): print("You are in block %s" % x))
  2. or download this
    >>> def _(x):
    ...     print("You are in block %s" % x)
    ...
    back in test
    You are in block 2
    test lambda a: print("You are in block %s" % a)
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2022-09-27 19:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (124 votes). Check out past polls.

    Notices?