>> How is this one supposed to work ? What is "with async blah()" ? > > a magic thing that runs the code block behind the covers, of course. > requires a > non-released version of the from __future__ statement, at the time.
;-)) > unlike the > following syntax: > > @server.get_synset_link() > def block(response): > format_expanded(li.content, response.related) Ok, that's nearly perfect! Only "nearly" because: 1. There are cases where you want the return value of the "get_synset_link". 2. You sometimes need more than one callback, and you cannot decorate two functions at once. For example, with Twisted you can define a callback (called on success) and an errback (called on error). But I agree that decorators help to solve a lot of problems. Thanks for the answer Antoine. _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com