Ruby blocks finally coming to python? (was Re: python-dev Summary for 2005-04-16 through 2005-04-30
Ville Vainio
ville at spammers.com
Mon May 16 10:02:11 EDT 2005
Just wanted to draw the attention by changing the subject line - see
parent and especially:
Tony> ----------------
Tony> PEP 340 Proposed
Tony> ----------------
Tony> In the end, Guido decided that what he really wanted as a solution to
Tony> `The Control Flow Management Problem`_ was the simplicity of something
Tony> like generators that would let him write locking() as something like::
Tony> def locking(lock):
Tony> lock.acquire()
Tony> try:
Tony> yield
Tony> finally:
Tony> lock.release()
Tony> and invoke it as something like::
Tony> block locking(lock):
Tony> CODE
--
Ville Vainio http://tinyurl.com/2prnb
More information about the Python-list
mailing list