Hey all,
Apologies for bringing up an old issue, but I think I've worked out a
Pythonic syntax for doing Ruby-style blocks. The short of it is:
with employees.select do (emp):
if emp.salary > developer.salary:
return fireEmployee(emp)
else:
return extendContract(emp)
I explain in detail in this blog article:
http://tav.espians.com/ruby-style-blocks-in-python.html
It covers everything from why these are useful to a proposal of how
the new ``do`` statement and __do__ function could work.
Let me know what you think.
My apologies if I've missed something obvious. Thanks!
--
love, tav
plex:espians/tav | [email protected] | +44 (0) 7809 569 369
http://tav.espians.com | http://twitter.com/tav | skype:tavespian
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com