How to rewrite this regular function with Deferred-style? def getCachedResult(cache, key): try: item = cache.open(key) except NotFound: return None
try: if item.obsolete(): return None data = item.read() finally: item.release() result = renew(data) return result Conditions: 1. 'cache.open' and 'item.read' become deffered 2. 'item.obsolete()' and 'renew(data)' are not deferred _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python