[svn r99] Minor change to make doctest work on both 2.3 and 2.5.
This commit is contained in:
@@ -453,11 +453,12 @@ class Actor(object):
|
|||||||
... else:
|
... else:
|
||||||
... print "received", message
|
... print "received", message
|
||||||
... def excepted(self, exc):
|
... def excepted(self, exc):
|
||||||
... print "excepted:", exc
|
... # printing out exc varies per version of Python
|
||||||
|
... print "excepted"
|
||||||
>>> a = Exceptor()
|
>>> a = Exceptor()
|
||||||
>>> a.cast('fail')
|
>>> a.cast('fail')
|
||||||
>>> api.sleep(0)
|
>>> api.sleep(0)
|
||||||
excepted: <type 'exceptions.TypeError'>
|
excepted
|
||||||
|
|
||||||
The main purpose of excepted is to prevent the actor's coroutine
|
The main purpose of excepted is to prevent the actor's coroutine
|
||||||
from dying.
|
from dying.
|
||||||
|
Reference in New Issue
Block a user