[Python-ideas] Ruby-style Blocks in Python Idea (alternative)
Joel Bender
jjb5 at cornell.edu
Wed Mar 11 21:32:12 CET 2009
Jan Kanis wrote:
> @lambda f: do_something(with_our(f))
> def result(param):
> print("called back with "+param)
> return foobar(param)
To keep result from stomping on the name, I would expect result to
actually be a result rather than a function :-):
@lambda f: do_something(with_our(f))
lambda param:
print("called back with "+param)
return foobar(param)
> But I don't really have a specific actual use case for this...
Looks interesting anyway.
Joel
More information about the Python-ideas
mailing list