[Twisted-Python] Re: [Twisted-commits] Updated defer.html so that the first 4 examples are runnable, split the 3rd
Clark C. Evans
cce at clarkevans.com
Sun Mar 9 16:45:55 EST 2003
On Sun, Mar 09, 2003 at 12:49:32PM +1100, Andrew Bennetts wrote:
| > class Getter:
| > def getData(self, x):
| > - self.blockUntilResult(x)
| > - return result
| > + return self.someBlockingCall(x)
| > +
| > + def someBlockingCall(self,x)
| > + print "blocking"
| > + import time
| > + time.sleep(4)
| > + return x * 3
| > g = Getter()
| > print g.getData(3)
| > +print "blocking"
| > +
| > </pre>
| Why does this code snippet now do 'print "blocking"' twice?
| Please don't be discouraged from working on the docs! They *do* need
| work... I just happen to think that defer.html is probably the doc least in
| need of improvement :)
Well, I picked it beacuse I've heared two newbies
get confused by it, not including myself.
More information about the Twisted-Python